Name: rlT66838 Date: 11/10/99
java version "1.2.2"
Classic VM (build JDK-1.2.2-001, native threads, symcjit)
The sample code demonstrates a problem using HTTPS to communicate with a web
server under IE. Under Netscape this code works exactly as intended (to print
out the contents of the stream from the web server for the given URL).
Note: The HTML was converted using HTMLConverter version 1.2, the exact plugin
specified is not 1.2.2, however, as shown by the Plug-In Java console window the
correct plugin is being executed. Manually editing the HTML to point
specifically to the 1.2.2 plugin does not change the results of this test.
------ APPLET SOURCE CODE -------
import java.applet.*;
import java.io.*;
import java.net.*;
public class ClientTest extends Applet {
public void start() {
URLConnection c;
try {
URL d=new URL("https://localhost:443/servlet/ConfigServlet");
c=d.openConnection();
InputStreamReader i=new InputStreamReader(c.getInputStream());
char r=0;
while(r!=-1) {
r=(char)i.read();
if(r==-1)
break;
System.out.print(r);
}
System.out.println("Sent request");
} catch(Exception e) {
e.printStackTrace();
}
}
}
------ END APPLET SOURCE -------
------ HTML -------
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
WIDTH = 100 HEIGHT = 100
codebase="http://java.sun.com/products/plugin/1.2/jinstall-12-win32.cab#Ve
rsion=1,2,0,0">
<PARAM NAME = CODE VALUE = ClientTest.class >
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.2">
<COMMENT>
<EMBED type="application/x-java-applet;version=1.2" java_CODE =
ClientTest.class WIDTH = 100 HEIGHT
= 100 pluginspage="http://java.sun.com/products/plugin/1.2/plugin-
install.html"><NOEMBED></COMMENT
>
</NOEMBED></EMBED>
</OBJECT>
------- END HTML --------
------- PLUGIN CONSOLE OUTPUT -------
Java(TM) Plug-in: Version 1.2.2.p001
Using JRE version 1.2.2
User home directory = H:\system
Proxy Configuration: Manual Configuration [removed details]
JAR cache disabled.
java.lang.NullPointerException
at java.io.Reader.<init>(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)
at java.io.InputStreamReader.<init>(Unknown Source)
at ClientTest.start(ClientTest.java, Compiled Code)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
------- END CONSOLE OUTPUT -------
(Review ID: 97642)
======================================================================
- duplicates
-
JDK-4295730 A https connection to the test Java Web Server can't be done by using Netscape.
-
- Closed
-