[jcifs] Problems with getOutputStream for a jCIFS client

Jan Christian Herlitz Jan.Christian.Herlitz at excosoft.se
Fri Apr 16 12:43:45 GMT 2004


Hello,

JCIFS works fantastic in our Tomcat servlet for authentication.

For our client it also works for "input" methods.
However, for PUT operations I get the following exception:

 java.net.ProtocolException: Cannot write output after reading input.
   at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(Unknown
Source)
   at
jcifs.http.NtlmHttpURLConnection.getOutputStream(NtlmHttpURLConnection.java:
240)

The code is as follows:

   URL url = new URL(query);
   HttpURLConnection con = (HttpURLConnection) url.openConnection();
   con.setDoOutput(true);
   con.setRequestMethod("PUT");
   con.connect();
   OutputStream out = con.getOutputStream();

This worked fine before registering the Smb URL handler.

Regards, Jan Christian Herlitz




More information about the jcifs mailing list