commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tilak Mitra" <tmi...@us.ibm.com>
Subject HTTPS and PostMethod problem/bug
Date Wed, 21 Aug 2002 14:43:14 GMT
Hello,
      I am trying to connect to a https site using the PostMethod to post
some data and get the response back.


      // code snippet, using JSSE from Sun as the provider
      Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());


            HttpClient client = new HttpClient();
            client.startSession("airmail.trondent.com",443,true) ;
            try
            {
                  PostMethod post = new PostMethod(
"/login.asp?action=login","C:\\temp") ;
                  post.addParameter("usermail","<myloginname>") ;
                  post.addParameter("password","<mypassword>") ;
                  post.setFollowRedirects(false);

                  client.executeMethod(post);

                  String response = post.getResponseBodyAsString();

                  System.out.println(response) ;

            }
            catch ( Exception e )
            {
                  e.printStackTrace() ;
            }
      }



      The code hangs in the executeMethod, and nothing happens ... no
output, no error , nothing ...

      Can you please advise me, where I am going wrong.
      I am trying to push to use this beautiful package of yours, but am
failing to do a simple proof of concept.

      Please help.

Regards
Tilak

Tilak Mitra
   IT Architect
   IBM Global Services EAD Group
   6301 Northwest 5th Way
   Ft Lauderdale , Fl - 33309
   Cell: 954 263 9050
   Home: 954 227 6669



--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message