4 Replies Latest reply on May 13, 2002 2:40 PM by g_andre

    https tunneling

    g_andre

      I am trying to configure jboss so that I can get information from another server within a servlet like this:

      URL url = new URL( "https://hostname:8443/test );

      I have tried the usual stuff:
      -add -Djava.protocol.handler.pkgs=com.sun.net.ssl.internal.www.protocol to the command line.

      set it just before I call the url.

      Nothing seem to work, I always get the following exception.

      2002-05-13 14:59:03,791 ERROR [STDERR] java.net.MalformedURLException: unknown protocol: https
      2002-05-13 14:59:03,791 ERROR [STDERR] at java.net.URL.(URL.java:480)
      2002-05-13 14:59:03,791 ERROR [STDERR] at java.net.URL.(URL.java:376)
      2002-05-13 14:59:03,791 ERROR [STDERR] at java.net.URL.(URL.java:330)

      Anyone know how to do it?

        • 1. Re: https tunneling
          • 2. Re: https tunneling
            g_andre

            I read that already but some part are still unclear.

            Do I have to write my own https handler in org.jboss.net.protocol.https.

            Where to find the test case mentionned by scott.

            Thanks.

            • 3. Re: https tunneling

              You will need to download from CVS until RC3 comes out.

              Regards,
              Adrian

              • 4. Re: https tunneling
                g_andre

                I found a hack but i would not call it pretty :)

                private static com.sun.net.ssl.internal.www.protocol.https.Handler httpsHandler;
                static
                {
                System.setProperty( "javax.net.ssl.trustStore" , System.getProperty( "jboss.server.home.dir" ) + "/keys/" + System.getProperty( "jboss.server.keystore" ) );
                System.out.println( System.getProperty( "jboss.server.home.dir" ) + "/keys/" + System.getProperty( "jboss.server.keystore" ) );
                httpsHandler = new com.sun.net.ssl.internal.www.protocol.https.Handler();
                }
                url = new URL( null , serverUrl , httpsHandler );

                Which module do I need to download from CVS?
                It would also be good to have a keys directory to store the keystore used by JBoss/Jetty and a variable pointing to it defined by default.