I have a Java Servlet running on Tomcat 4.1.12.
At some point, this Servlet needs to send data to another Servlet which is
right now on the same web-server, but in the future, it will be on a different
web-server, also running Tomcat.  I have installed the JSSE jar files in the
JAVA_HOME/jre/ext/lib directory, and I can download web pages from Tomcat
using https URL's.

So, I open a URLConnection:
    try
    {
      URL servletURL = new
URL(getServletConfig().getInitParameter("printServletURL"));

      URLConnection con = servletURL.openConnection();

      con.setUseCaches(false);
      con.setRequestProperty("CONTENT_TYPE","application/octet-stream");
      con.setDoInput(true);
      con.setDoOutput(true);
.........


When I run the servlet, I get the following Exception
SEVERE: Handshake failed
javax.net.ssl.SSLHandshakeException: Received fatal alert: certificate_unknown
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.b(DashoA6275)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
        at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)


So, how does one get a Java Servlet on Tomcat to act as an SSL client, and
connect to another SSL server?


--Monte Glenn Gardner

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to