commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Libbrecht <p...@activemath.org>
Subject Re: [HttpClient] Using httpclient in applets
Date Wed, 04 Dec 2002 13:48:25 GMT
I think your best attempt is to remove System.getProperties in the 
source-code and try to patch things appropriately later (recompiling 
cleanly and working on errors and follow-up).

The consideration about using jakarta-commons things for applet is, I 
believe, important and I wonder wether some kind of flag as to wether a 
library is or is not applet-compatible would make a lot of sense.
(there used to be a time when this was in the faq and demos of most 
projects).

Paul


On Mercredi, d├ęcembre 4, 2002, at 12:38 , Joel Palmius wrote:

> 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
> variable).
>
> 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
>
>  --
> To unsubscribe, e-mail:   <mailto:commons-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:commons-user-
> help@jakarta.apache.org>


Mime
View raw message