*
The moose likes Tomcat and the fly likes java.net.ProtocolException: Does not support output Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "java.net.ProtocolException: Does not support output" Watch "java.net.ProtocolException: Does not support output" New topic
Author

java.net.ProtocolException: Does not support output

chetan dhumane
Ranch Hand

Joined: Jan 07, 2009
Posts: 629

When i try to write the files on tomcat it gives me following exception
java.net.ProtocolException: Does not support output

My code is :


http://www.androcid.com/
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
This has completely nothing to do with Tomcat. You would get exactly the same problem at all other application servers. It's just a bug in your code.

Read this how to *read* from an URL: http://java.sun.com/docs/books/tutorial/networking/urls/readingWriting.html
You need to interpret "input" and "output" from *your* perspective, not from the other side.
chetan dhumane
Ranch Hand

Joined: Jan 07, 2009
Posts: 629

Thanks for your suggestion but I want to upload the file to tomcat server
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
Then set the output. Read the same tutorial again, but then the *writing* part.
chetan dhumane
Ranch Hand

Joined: Jan 07, 2009
Posts: 629

Now im getting java.net.SocketTimeoutException
Check this code
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.net.ProtocolException: Does not support output