我有使用以下命令SocketTimeoutException:讀取超時
Document doc = Jsoup.connect(url).post();
然後我的web應用程序將一些修改再重新顯示HTML頁面 它工作正常讀取HTML頁面的Web應用程序,它讀取任何HTML我給它的頁面。但是,有些頁面並未被我的程序所接受。因此,應用程序給我下面的錯誤 類型異常報告
消息
description The server encountered an internal error() that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.net.SocketTimeoutException: Read timed out
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:404)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
java.net.SocketTimeoutException: Read timed out
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(SocketInputStream.java:129)
java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
java.io.BufferedInputStream.read(BufferedInputStream.java:317)
sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1195)
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:381)
org.jsoup.helper.HttpConnection$Response.execute(HttpConnection.java:364)
org.jsoup.helper.HttpConnection.execute(HttpConnection.java:143)
org.jsoup.helper.HttpConnection.post(HttpConnection.java:138)
org.apache.jsp.ModelsForAllE_jsp._jspService(ModelsForAllE_jsp.java:105)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
爲什麼它正常工作與一些網頁,並與一些它給我這個錯誤? 這是我的應用程序或Tomcat的問題嗎?
感謝,
這可能有很多原因。也許外部頁面拒絕您的請求...總是導致錯誤的相同URL? – home