wood burning stoves 2.0*
The moose likes Servlets and the fly likes Servlet -- HttpsURLConnection problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet -- HttpsURLConnection problem" Watch "Servlet -- HttpsURLConnection problem" New topic

Servlet -- HttpsURLConnection problem

naresh babu

Joined: Feb 12, 2002
Posts: 12
I have a ssl proxy servere installed which routes requests to non-ssl url. At proxy, i installed server certificate and changed SSLClinetAuth
to off so that client need not produce any client authentication.
I am writing servlet(which is a client ) trying top open a HttpsURLCOnnection to access proxy using:
URL url = new URL("https://hostname.central.sun.com:443/servlet/TestServlet");
HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();

WHen i execute , i get error as :
Exception in thread "main" java.lang.NoSuchMethodError: sun.net.www.http.KeepAliveCache: method get(Ljava/net/URL;Ljava/lang/Object Ljava/lang/Object; not found
at sun.net.www.protocol.https.HttpsClient.a(DashoA6275)
at sun.net.www.protocol.https.HttpsClient.a(DashoA6275)
at sun.net.www.protocol.https.HttpsClient.a(DashoA6275)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.plainConnect(DashoA6275)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(DashoA6275)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(DashoA6275)
at pkg1.SecureSessionCredentialsNew.<init>(SecureSessionCredentialsNew.java:169)
at pkg1.SecureSessionCredentialsNew.main(SecureSessionCredentialsNew.java:522)

What am i missing.Should i include anything else?
Any help is appreciated.
I agree. Here's the link: http://aspose.com/file-tools
subject: Servlet -- HttpsURLConnection problem
Similar Threads
HttpsURLConnection problem
Error accessing application in Tomcat 5
Testing IBM MQ on BEA Weblogic Server
HttpsURLConnection - Problem in SSL Handshaking