How to use Sun's HttpsURLConnection in 6.0 - Weblogic

This is a discussion on How to use Sun's HttpsURLConnection in 6.0 - Weblogic ; I have a servlet, which opens a connection to a https site. I=20 was able to solve this problem in version 5.1 by adding the=20 following in weblogic.policy=20 permission=20 javva.security.AllPermission "java.protocol.handler.pkgs", "read" ;, and setting weblogic.security.ssl.enable=3Dfalse in the=20 properties file. ...

+ Reply to Thread
Results 1 to 6 of 6

How to use Sun's HttpsURLConnection in 6.0

  1. Default How to use Sun's HttpsURLConnection in 6.0


    I have a servlet, which opens a connection to a https site. I=20
    was able to solve this problem in version 5.1 by adding the=20
    following in weblogic.policy=20
    permission=20
    javva.security.AllPermission "java.protocol.handler.pkgs", "read"
    ;, and setting weblogic.security.ssl.enable=3Dfalse in the=20
    properties file. I tried the same in version 6.0, but it doesn't
    seem to work.

    Does anyone have any suggestions?
    Thanks.


  2. Default Re: How to use Sun's HttpsURLConnection in 6.0


    Somehow this got removed from news group. It's still an open issue. Any h=
    elp would be very appreciated.

    "Mike G" <mag@qpax.com> wrote:
    >
    >I have a servlet, which opens a connection to a https site. I=20
    >was able to solve this problem in version 5.1 by adding the=20
    >following in weblogic.policy=20
    >permission=20
    >javva.security.AllPermission "java.protocol.handler.pkgs", "read"
    >;, and setting weblogic.security.ssl.enable=3Dfalse in the=20
    >properties file. I tried the same in version 6.0, but it doesn't
    >seem to work.
    >
    >Does anyone have any suggestions?
    >Thanks.




  3. Default Re: How to use Sun's HttpsURLConnection in 6.0

    I use the URL(URL context, String spec, URLStreamHandler handler) constucto=
    r
    and use sun's streamhandler - this doesn't require any configuration change=
    s
    (except security permissions).

    Mike G <mag@qpax.com> wrote:

    > I have a servlet, which opens a connection to a https site. I=20
    > was able to solve this problem in version 5.1 by adding the=20
    > following in weblogic.policy=20
    > permission=20
    > javva.security.AllPermission "java.protocol.handler.pkgs", "read"
    > ;, and setting weblogic.security.ssl.enable=3Dfalse in the=20
    > properties file. I tried the same in version 6.0, but it doesn't
    > seem to work.


    > Does anyone have any suggestions?
    > Thanks.


    Dimitri


  4. Default Re: How to use Sun's HttpsURLConnection in 6.0


    Would you mind sending me an example. =20
    When you mean security permissions, do you mean setting the SSL=20
    HandlerEnabled property to false, and adding permission=20
    java.security.AllPermission "java.protocol.handler.pkgs", "read";
    to the weblogic.policy file?

    Thanks for your help.

    Dimitri Rakitine <dr@dima.dhs.org> wrote:
    >I use the URL(URL context, String spec, URLStreamHandler handler) constuct=

    or
    >and use sun's streamhandler - this doesn't require any configuration chang=

    es
    >(except security permissions).
    >
    >Mike G <mag@qpax.com> wrote:
    >
    >> I have a servlet, which opens a connection to a https site. I=20
    >> was able to solve this problem in version 5.1 by adding the=20
    >> following in weblogic.policy=20
    >> permission=20
    >> javva.security.AllPermission "java.protocol.handler.pkgs", "read"
    >> ;, and setting weblogic.security.ssl.enable=3Dfalse in the=20
    >> properties file. I tried the same in version 6.0, but it doesn't
    >> seem to work.

    >
    >> Does anyone have any suggestions?
    >> Thanks.

    >
    >Dimitri




  5. Default Re: How to use Sun's HttpsURLConnection in 6.0


    I got this to work now by adding the following code:

    //create a URLStreamHandler based on sun's ssl implementation
    URLStreamHandler handler =3D (URLStreamHandler)(Class.forName
    ("com.sun.net.ssl.internal.www.protocol.https.Handler").newInstan
    ce());
    URL myURL =3D new URL(null, urlSite, handler);

    I still do not know why I had to create a URLStreamHandler in=20
    order to make a SSL connection to a https site in weblogic 6.0
    but in 5.1 I did not????

    "Mike G" <mag@qpax.com> wrote:
    >
    >Would you mind sending me an example. =20
    >When you mean security permissions, do you mean setting the SSL=20
    >HandlerEnabled property to false, and adding permission=20
    >java.security.AllPermission "java.protocol.handler.pkgs", "read";
    >to the weblogic.policy file?
    >
    >Thanks for your help.
    >
    >Dimitri Rakitine <dr@dima.dhs.org> wrote:
    >>I use the URL(URL context, String spec, URLStreamHandler handler) constuc=

    tor
    >>and use sun's streamhandler - this doesn't require any configuration chan=

    ges
    >>(except security permissions).
    >>
    >>Mike G <mag@qpax.com> wrote:
    >>
    >>> I have a servlet, which opens a connection to a https site. I=20
    >>> was able to solve this problem in version 5.1 by adding the=20
    >>> following in weblogic.policy=20
    >>> permission=20
    >>> javva.security.AllPermission "java.protocol.handler.pkgs", "read"
    >>> ;, and setting weblogic.security.ssl.enable=3Dfalse in the=20
    >>> properties file. I tried the same in version 6.0, but it doesn't
    >>> seem to work.

    >>
    >>> Does anyone have any suggestions?
    >>> Thanks.

    >>
    >>Dimitri

    >




  6. Default Re: How to use Sun's HttpsURLConnection in 6.0

    From example:

    test.jsp:

    <%@ page import=3D"java.io.*" %>
    <%@ page import=3D"java.net.*" %>
    <%
    java.security.Security.addProvider(new com.sun.net.ssl.internal.ssl.Provide=
    r());
    URL etrade =3D new URL(null,=20
    "https://trading.etrade.com/cgi-bin/gx.cgi/AppLogic+Lo=
    ginpage",=20
    new com.sun.net.ssl.internal.www.protocol.https.Handle=
    r());
    BufferedReader br =3D new BufferedReader(new InputStreamReader(etrade.openS=
    tream()));
    String line;
    while((line =3D br.readLine()) !=3D null) {
    out.println(line);
    }
    br.close();
    %>



    Mike G <mag@qpax.com> wrote:

    > Would you mind sending me an example. =20
    > When you mean security permissions, do you mean setting the SSL=20
    > HandlerEnabled property to false, and adding permission=20
    > java.security.AllPermission "java.protocol.handler.pkgs", "read";
    > to the weblogic.policy file?


    > Thanks for your help.


    > Dimitri Rakitine <dr@dima.dhs.org> wrote:
    >>I use the URL(URL context, String spec, URLStreamHandler handler) constuc=

    tor
    >>and use sun's streamhandler - this doesn't require any configuration chan=

    ges
    >>(except security permissions).
    >>
    >>Mike G <mag@qpax.com> wrote:
    >>
    >>> I have a servlet, which opens a connection to a https site. I=20
    >>> was able to solve this problem in version 5.1 by adding the=20
    >>> following in weblogic.policy=20
    >>> permission=20
    >>> javva.security.AllPermission "java.protocol.handler.pkgs", "read"
    >>> ;, and setting weblogic.security.ssl.enable=3Dfalse in the=20
    >>> properties file. I tried the same in version 6.0, but it doesn't
    >>> seem to work.

    >>
    >>> Does anyone have any suggestions?
    >>> Thanks.

    >>
    >>Dimitri



    --=20
    Dimitri


+ Reply to Thread