on 06-26-2009 5:46 AM
Hello
I´m building a simple servlet that retrieves Cookies information of a website and displays in the screen. I´m using the following code to retrieve headers:
HttpURLConnection urlConn;
URL url= new URL ("http://mywebsite");
urlConn = (HttpURLConnection) url.openConnection();
String testHeader = urlConn.getHeaderField(2);
out.println("Key: " + testHeader);
When I run this code locally, it runs perfectly and fast. When I run on J2EE Server SAP, the getHeaderField line takes about 3 minutes to end. I changed the code to show the current time before and after the "print" of Header. The result is:
Thu, 25-Jun-2009 18:53:21
Key: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.8k mod_jk/1.2.28
Thu, 25-Jun-2009 18:56:31
If I take the line of "getHeaderField" off, the program runs fast.
Does anyone have an idea of what´s going on ? I´m using J2EE SAP Server of Netweaver 7.0 (sp13)
Thanks
Hi,
may be,you will have to go for latest JDK .
you can check http connection test in SICF
Note 554244 - HTTP connection does not function
Note 783515 - Error processing redirects in the HTTP client
Also check SM21 logs on this.
regards
nag
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.