title: java.io.IOException: Server returned HTTP response code: 500 for URL: https://hostname:port/xxx.do
body: <p>We are getting the "java.io.IOException: Server returned HTTP response code: 500 for URL" error for the following code which is for applet-servlet communication. The same code has been working for long and now suddenly we see this error. Could something be wrong with tomcat setup? Tomcat logs do not show any error. The exception is thrown on the java console which points to this piece of code. Is there a good way to debug this error code?</p>
  
  <pre><code>     URLConnection u = getConnection( url );
       BufferedOutputStream bo = new BufferedOutputStream( u.getOutputStream() );
       ObjectOutputStream oo = new ObjectOutputStream( bo );
       oo.writeObject( someobject );
       oo.flush();
       BufferedInputStream bi = new BufferedInputStream( u.getInputStream() ); //getting the error on this line
       ObjectInputStream oi = new ObjectInputStream( bi );
       Object a_object = oi.readObject();
  </code></pre>
  
  <p>Any help would be appreciated.</p>