Websphere 3.5 and SSL servlet to servlet

Hi ,

This is a question on configuration of the websphere environment .

Here is my problem :

I have a class that has no problem communicating with a https servlet when executed as a java application .

the steps that I took to ensure this are

1. setting the following jar files in my classpath

jcert.jar , jsse.jar and jnet.jar .

2. in the java.security file of my OS jre I made these entries

security.provider.2=com.sun.rsajca.Provider

security.provider.3=com.sun.net.ssl.internal.ssl.Provider

after that I had no problem getting it working .

Now to my problem :

I did the same thing for the websphere environment :

the classpath part seems to be okay ( since I did not get the class defination not found exception )

But instead I get this

java.net.MalformedURLException: unknown protocol: https

I am sure it has to do with the settings but I may be wrong ......

please help !!!!! Help !!!! Help !!!

kpt

[1037 byte] By [kpthottam] at [2007-9-26 1:23:18]
# 1

Hi kpt,

Please check the System property and Security provider in your code . It must be mentioned as below:

System.setProperty("java.protocol.handler.pkgs", "com.sun.net.ssl.internal.www.protocol");

Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());

Hope this will help you.

Regards,

Anil.

Technical Support Engineer.

ramanil_indts at 2007-6-29 1:01:34 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...
# 2

Hi Anil ,

my code snippet:

public String getOpenUrl ( String cookiestring , String url )

{

String temp = "" ;

try

{

System.setProperty ("java.protocol.handler.pkgs" , "com.sun.net.ssl.internal.www.protocol" ) ;

java.security.Security.addProvider ( new com.sun.net.ssl.internal.ssl.Provider () ) ;

System.out.println ( "loading the https protocol handler" ) ;

URL targeturl = new URL ( url ) ;

URLConnection connection = targeturl.openConnection();

connection.setRequestProperty("Cookie" , cookiestring );

InputStream is = connection.getInputStream();

InputStreamReader isr = new InputStreamReader ( is ) ;

BufferedReader br = new BufferedReader ( isr ) ;

StringBuffer sb = new StringBuffer () ;

String temp1 = br.readLine();

while ( temp1 != null )

{

//System.out.println( temp1);

sb.append(temp1);

temp1 = br.readLine();

}

temp = new String ( sb ) ;

br.close() ;

isr.close();

is.close();

br = null;

isr = null ;

is = null ;

connection = null ;

}

catch ( Throwable t )

{

System.out.println("getOpenUrl in SessionSpoofGeneral" + t );

}

finally

{

return temp ;

}

}

yes , I do have that in my code . as I explained my code works as a java application , but not in the websphere environment .

thanks for your effort any way.

kpt

kpthottam at 2007-6-29 1:01:34 > top of Java-index,Security,Java Secure Socket Extension (JSSE)...