hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Johnson <...@u.washington.edu>
Subject Running in Applet-viewer vs Firefox
Date Fri, 04 May 2007 22:33:42 GMT

Hi! I've just subscribed to the list in the hopes of gaining some insight 
into the following problem...

On MacOS 10.4, developing with eclipse set to use compliance level 1.4, I 
am trying to use HttpClient to connect to a web server. In Applet-viewer 
this works fine, but I've had a devil of a time getting it to work off my 
web server. Having browsed the mailing list archives some, it's clear that 
this *can* work -- so it's probably user-befuddlement and/or outright 
ignorance.

One possible source of mistakes: this is the first applet I've done that 
uses libraries (the commons packages) in separate JAR files. I thought I 
just needed to put all the .jar files into the ARCHIVE="" parameter on the 
HTML APPLET tag, but I kept getting "java.lang.NoClassDefFoundError" at 
the first "new HttpClient()" (and the traceback had no org.apache... 
pieces). I concluded that the ARCHIVE parameter wasn't really delivering 
the libraries as needed. Something I found on the web suggested I might 
need to monkey with the manifest, so I unZipped one of the jar files and 
used the resulting folder (a) as a model to package my own applet, and (b) 
as a place to put a "Class-Path:" header with all the commons jars on it. 
I then reZipped and renamed it. Now the applet tag is

       <applet code="dirList/MenuDemo2.class" name="MenuDemo2"
        archive="MenuDemo.jar"
        width="400" height="500">

The applet launches, but the "new HttpClient()" still runs into problems..

java.lang.ExceptionInInitializerError
    at org.apache.commons.httpclient.HttpClient.<clinit>(HttpClient.java:66)
      ...
Caused by: java.security.AccessControlException: access denied (java.util.PropertyPermission

org.apache.commons.logging.LogFactory.HashtableImpl read)
    at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)

fwiw, the url being accessed is on port 8080.

Suggestions?  Thanks for your insights.

   -Brian Johnson, Dept of Architecture, University of Washington, Seattle


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message