This may have something to do with your app server (servlet container).
I've run into issues with EAServer and SSL since it uses internal,
proprietary classes to connect via https.  Look into installing JSSE and
using the Apache commons HttpClient.  This worked for me.

--Kevin

-----Original Message-----
From: Lucero, Dennis M [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 09, 2004 11:07 AM
To: [EMAIL PROTECTED]
Subject: URL connections


I am having a strange problem. When I try and connect to a URL within
the struts framework (within an action class) I get errors.
 
Below is the code, this code works fine in a standalone java class
(main)  but in an action class I get an error when I try and 
Cast the connection,  any help is appreciated.
 
I do not get any exceptions thrown in the try blocks, and I get the
output con is NOT null
 
Thanks
 
 
---------------code -----------------------------
        String myUrl =
"https://onlinein.bankofamerica.com/cgi-bin/sso.login.controller";;
 
        URL url = null;
 
        try{
        url = new URL(myUrl);
        }catch(Exception e){System.out.println(e.getMessage());}
 
        System.out.println("report url is:  " + url.toString());
        URLConnection con = null;
 
        try{
            con = url.openConnection();
        }catch(Exception e){System.out.println(e.getMessage());}
 
        if(con==null)
            System.out.println("con is null");
        else
            System.out.println("con is NOT null");
   
 
        HttpsURLConnection conn = (HttpsURLConnection)con;

 
 
 
 
 
 
------------end code ---------------------------
 
 
Because the world is round it turns me on
Because the wind is high it blows my mind
Because the sky is blue it makes me cry
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to