我們正在獲取「java.io.IOException:服務器返回的HTTP響應代碼:500 「下面的代碼是針對applet-servlet通信的錯誤。相同的代碼已經工作了很長時間,現在突然我們看到了這個錯誤。 tomcat安裝程序可能有問題嗎? Tomcat日誌不顯示任何錯誤。 Java控制檯上拋出的異常是指向這段代碼的。有沒有一種好的方法來調試這個錯誤代碼?java.io.IOException:服務器返回的HTTP響應代碼:500 for URL:https:// hostname:port/xxx.do
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();
任何幫助,將不勝感激。
500是[服務器錯誤](http://en.wikipedia.org/wiki/HTTP_status_code#5xx_Server_Error)的錯誤代碼。因此,不要看客戶端代碼,而是希望查看* server *代碼。 – 2010-10-22 21:53:36