Hi Brian, I had encountered similar problems while trying to make my applet work with a web browser. A couple of things..
1. You might have to use certificate in order to load the applet on client machine and make it do its task. If you need more information on how to do self signing, go to the following link http://personal.vsnl.com/sureshms/javasign1.html. This will probably remove your 'AccessControlException' error. 2. The size of the jar file defined in the ARCHIVE tag is critical to successful loading of the applet. Try using the reduced version of the HttpClient.jar from the following link http://chiralsoftware.net/httpclient-fork.html 3. Make sure the jar file for HttpClient is also specified along with your class specific jar in the ARCHIVE tag for eg. archive="MenuDemo.jar,httpclient.jar". 3. -----Original Message----- From: Brian Johnson [mailto:[EMAIL PROTECTED] Sent: Friday, May 04, 2007 5:34 PM To: [email protected] Subject: Running in Applet-viewer vs Firefox 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
