Meaningless Drivel is fun!
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


Win a copy of Building Microservices this week in the Design forum!
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: 639

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

My code is :


Author @ http://www.ideasforideas.org/
Moody blogger who do not like to behave like target setting machines work.
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: 639

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: 639

Now im getting java.net.SocketTimeoutException
Check this code
 
 
subject: java.net.ProtocolException: Does not support output
 
It's not a secret anymore!