I am trying to use Tomcat 3.2.1 standalone compiled with SSL support and
Jsse 1.0.2
I hava configured Tomcat to use port 443 with SSL and it works fine using a
browser.
If I use "http://myserver/mypage.html" it do not use ssl
If I use "https://myserver/mypage.html" it uses ssl.
Now I m using jsse to open a secure socket connection to get the same page.
The code is as follows:
***************************************************************************
********
SSLSocket socket =
(SSLSocket)factory.createSocket("myserver", 443);
socket.startHandshake();
PrintWriter out = new PrintWriter(
new BufferedWriter(
new OutputStreamWriter(
socket.getOutputStream())));
out.println("GET http://myserver/mypage.html HTTP/1.0");
out.println();
out.flush();
if (out.checkError())
System.out.println(
"SSLSocketClient: java.io.PrintWriter error");
/* read response */
BufferedReader in = new BufferedReader(
new InputStreamReader(
socket.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null)
System.out.println(inputLine);
in.close();
out.close();
socket.close();
***************************************************************************
*************
The code is copied from the Jsse examples.
Tomcat returns an error: Request not found and the execption in Tomcat is:
java.io.exception Name of file,directory or volume label is not valid.
The same code works fine with www.verisign.com/index.html.
It also works with a server using IIS4.0.
Thanks in advance,
Valen
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]