|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
number of retriesi have a problem when parsing
http://www.winzerin.at/Freunde.htm the only javascript there cant be downloaded(timeouts) and it tries it several times. is it possible to configure the number of retries and if how? i know that i can do this in httpclient method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler(1, false)); 04.11.2009 13:07:26 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection timed out 04.11.2009 13:07:26 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request 04.11.2009 13:10:35 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection timed out 04.11.2009 13:10:35 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request 04.11.2009 13:13:44 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection timed out 04.11.2009 13:13:44 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry INFO: Retrying request 04.11.2009 13:16:53 com.gargoylesoftware.htmlunit.html.HtmlPage loadJavaScriptFromUrl SCHWERWIEGEND: Error loading JavaScript from [http://webpagerank.de/wr/counter.js.php?client=735]. java.net.ConnectException: Connection timed out at java.net.PlainSocketImpl.socketConnect(Native Method) at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) at java.net.Socket.connect(Socket.java:525) at java.net.Socket.connect(Socket.java:475) at java.net.Socket.<init>(Socket.java:372) at java.net.Socket.<init>(Socket.java:246) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80) at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122) at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:97) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1439) at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1370) at com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:995) regards reinhard ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Htmlunit-user mailing list Htmlunit-user@... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
|
|
Re: number of retriesHi,
if I correctly remember, it is possible to configure it in the default options of HttpClient. Alternatively, you can subclass HttpWebConnection to manage it there. Remember that we want to migrate to HttpClient 4 (hopefully) in next release and therefore that your code calling HttpClient 3 API may be obsolete at this time. Cheers, Marc. reinhard schwab a écrit : > i have a problem when parsing > http://www.winzerin.at/Freunde.htm > > the only javascript there cant be downloaded(timeouts) and it tries it > several times. > is it possible to configure the number of retries and if how? > i know that i can do this in httpclient > method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, > new DefaultHttpMethodRetryHandler(1, false)); > > > 04.11.2009 13:07:26 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry > INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection timed out > 04.11.2009 13:07:26 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry > INFO: Retrying request > 04.11.2009 13:10:35 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry > INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection timed out > 04.11.2009 13:10:35 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry > INFO: Retrying request > 04.11.2009 13:13:44 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry > INFO: I/O exception (java.net.ConnectException) caught when processing request: Connection timed out > 04.11.2009 13:13:44 org.apache.commons.httpclient.HttpMethodDirector executeWithRetry > INFO: Retrying request > 04.11.2009 13:16:53 com.gargoylesoftware.htmlunit.html.HtmlPage loadJavaScriptFromUrl > SCHWERWIEGEND: Error loading JavaScript from [http://webpagerank.de/wr/counter.js.php?client=735]. > java.net.ConnectException: Connection timed out > at java.net.PlainSocketImpl.socketConnect(Native Method) > at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) > at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) > at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) > at java.net.Socket.connect(Socket.java:525) > at java.net.Socket.connect(Socket.java:475) > at java.net.Socket.<init>(Socket.java:372) > at java.net.Socket.<init>(Socket.java:246) > at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80) > at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122) > at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707) > at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361) > at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387) > at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171) > at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) > at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) > at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:97) > at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1439) > at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1370) > at com.gargoylesoftware.htmlunit.html.HtmlPage.loadJavaScriptFromUrl(HtmlPage.java:995) > > regards > reinhard > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Htmlunit-user mailing list > Htmlunit-user@... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Htmlunit-user mailing list Htmlunit-user@... https://lists.sourceforge.net/lists/listinfo/htmlunit-user |
| Free embeddable forum powered by Nabble | Forum Help |