Thank you much Roland for the prompt reply. Well, I think the server side 
should be ok since before this switch to commons-httpclient I had no problem 
with the URL -> HttpURLConnection.openConnection() -> conn.getOutputStream() 
route. And funny you should mention logging because it was what I feared most 
to touch on as I've been wondering in the context of an applet where the logs 
should go and how do I dictate that, so I simply left it and hoped for the 
best. But I will try to make use of logs and see if I can spot anything.

As for the code itself, it's actually quite simple but it maybe useful for you 
folks to see (well, it comes after this paragraph). Now my million dollar 
question is this, does one have to do any tricky things to get httpclient 
working with https URLs in an applet?
  
HttpClient httpClnt = new HttpClient();
httpClnt.getParams().setParameter( "http.socket.timeout",
                                   new Integer( 60000 ) );

PostMethod poster = new PostMethod( Constants.APP_HOME_URL_PFX +
                                    "/myPlainTextInputAndAnswering.jsp" );
RequestEntity rqst =
   new StringRequestEntity( lotInfoRqstLn, "text/plain", "iso-8859-1" );
poster.setRequestEntity( rqst );

BufferedReader srvlRsp = null;
int respCode = 0;
try {
   respCode = httpClnt.executeMethod( poster );
   if (respCode == 200) {
      srvlRsp = new BufferedReader(
         new InputStreamReader( poster.getResponseBodyAsStream() ) );
   }
}
catch (IOException ioe) {
   // the error I quoted was caught here
}


--
This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com
http://www.opensubscriber.com/message/httpclient-dev@jakarta.apache.org/4579759.html

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

Reply via email to