This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Sockets and Internet Protocols and the fly likes java.io.IOException: Server returned HTTP response code: 500 for URL: Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "java.io.IOException: Server returned HTTP response code: 500 for URL: " Watch "java.io.IOException: Server returned HTTP response code: 500 for URL: " New topic
Author

java.io.IOException: Server returned HTTP response code: 500 for URL:

elay Raja
Greenhorn

Joined: Jun 10, 2008
Posts: 27
Thank you for helping me to resolve the previous post.

I want to upload a file with size (>2GB).So i am using applet with servlet to upload it.When i connect applet to servlet using URL class from Java.net which is shown below:-

Now connection is establishing to servlet.But i din get any response from servlet.By using http it is perfectly working in NetBeans IDE6.0.Since i'm using https, i had changed the code like this

URL urlServlet = new URL("https://.........../EchoServlet");HttpsURLConnection con = (HttpsURLConnection)urlServlet.openConnection();

In servlet i had written the code like this...

InputStream in = request.getInputStream();
ObjectInputStream inputFromApplet = new ObjectInputStream(in);
String sourcefield = (String) inputFromApplet.readObject();
System.out.println(sourcefield); System.out.println("successfully read from applet");


I don know whether the control goes to servlet or not. I am getting the exception shown below:-

java.io.IOException: Server returned HTTP response code: 500 for URL: https://........./EchoServlet
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
Please help me to resolve this issue.

[ June 12, 2008: Message edited by: elay Raja ]

[ June 12, 2008: Message edited by: elay Raja ]
[ June 12, 2008: Message edited by: elay Raja ]
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8914
    
    8

What does the server log say?
Have you configured SSL? You have to do that before you can use it (note: the instructions may be different for different version of Tomcat, be sure you're on the right page).


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
GeeCON Prague 2014
 
subject: java.io.IOException: Server returned HTTP response code: 500 for URL: