• Post Reply Bookmark Topic Watch Topic
  • New Topic

java.io.IOException: Server returned HTTP response code: 405

 
Ansar Shah
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All

I am facing problems in Applet-Servlet communication. I open a HttpURLConnection --> get outputstream --> write object on it.

Then i want to read the response from servlet on same connection after getting the input stream. BUT i face an exception doing this. Can someone help me out. Here is the code snippet along with the stacktrace.



Exception Stack trace:

java.io.IOException: Server returned HTTP response code: 405 for URL: http://localhost:8080/context/updateprofile.do
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
.
.
.

Thanks

[ UD: fixed formatting ]
[ March 13, 2008: Message edited by: Ulf Dittmer ]
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
405 means "method not allowed", indicating that the server does not implement whatever HTTP method the code uses. Does the server implement POST?
[ March 13, 2008: Message edited by: Ulf Dittmer ]
 
Ansar Shah
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ulf Dittmer for your help. Yes you are right and the problem resolved.
Thanks again.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!