URL Object access HTTPS web pages

sjr <[email protected]> Sat, 9 Oct 2004 14:39:09 +0800
Newsgroups gmane.comp.java.sun.servlet
Message-ID <001701c4adca$ae6c03d0$1b00a8c0@sjr>
Hello, every one:

In Tomcat ( above 4.1.xx ), I have configured The SSL connector on port 8443,
then I can access the url "https://192.168.0.27:8443/test.html" correctly in IE, 
But when runing the following code :

      URL  url = new URL( "https://192.168.0.27:8443/test.html" );
      url.openStream();
      
in a JSP file, the following Exception throwed, Who know why this happen and how to correct it?

java.io.IOException: HTTPS hostname wrong:  should be <192.168.0.27>, but cert says 
 at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a(DashoA6275)
 at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a(DashoA6275)
 at com.sun.net.ssl.internal.www.protocol.https.HttpsClient.a(DashoA6275)
 at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.connect(DashoA6275)
 at com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnection.getInputStream(DashoA6275)
 at java.net.URL.openStream(URL.java:798)