On Jeudi, d�cembre 5, 2002, at 03:50 , Joel Palmius wrote:

Attached is a quick and dirty fix for making HttpClient work in applets. I
simply commented out the getProperties() calls and replaced them with
setting the appropriate string to what was earlier in the default value
part of the call. With the patch applied this code works in a JApplet:

String docbase = this.getDocumentBase().toString();
URL url = new URL(docbase);
String host = url.getHost();

This raises a funny question: is there a way for a library being called from an applet to test wether it's in an applet ? I would do it precisely with System.getProperties() catching the exception but there should be a cleaner way !

Paul


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



Reply via email to