commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel Palmius <>
Subject [HttpClient] Using httpclient in applets
Date Wed, 04 Dec 2002 11:38:38 GMT
I'm currently experimenting with adding an applet layer on top of a
servlet application. This works ok when using URLConnection to fetch/send
data to/from the servlet.

However, while URLConnection works, it is a rather clumsy way of doing
longer conversations. Keeping track of the session cookie and such things
is possible, but a nuisance.

Thus an attempt at utilizing HttpClient. However, it seems that it is not
possible to even instantiate a HttpClient object in a JApplet, as an
AccessControlException (permission denied) is thrown (see attached stack
trace). From reading the stack trace and the source code, I gather that
the problem is the attempted calling of System.getProperties(), which is
not allowed in applets (this call is made around line 179 in the head of
the HttpMethodBase class in order to set the static user agent string

My question is: Is support for applets planned in HttpClient? Before I
continue tinkering with the source code, are there any known reasons
(apart from the getProperties() call) why HttpClient shouldn't be possible
to use in applets?

I'm using sun j2sdk 1.4.1 and commons-httpclient-20021202.

  // Joel

View raw message