tomcat开的时间开了. tomcat没有报什么错误. 客户端就是不能访问.
我写了程序去访问
-------------------------------
try
{
HttpURLConnection c = (HttpURLConnection) new URL( "http://www.ypworld.cn/ ").openConnection();
InputStream is = c.getInputStream();
is.read();
is.close();
} catch (Exception ex)
{
ex.printStackTrace();
}
显示出的报错
-----------------------
G:\e\workspace\ypworld\build\classes> java Test
java.net.SocketException: Unexpected end of file from server
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:729)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:592)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:726)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:592)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1004)
at Test.main(Test.java:34)
我用的是tomcat v6.0.13 jre是6u1
哪位知道是什么原因?? 是不是并发太大了?? 现在一天要重启好几次tomcat。
------解决方案--------------------
at Test.main(Test.java:34)
代码帖出
------解决方案--------------------
网络错误