aspose file tools*
The moose likes Applets and the fly likes Applet loading issues Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet loading issues" Watch "Applet loading issues" New topic
Author

Applet loading issues

Faisal Ul-Haque
Greenhorn

Joined: Dec 02, 2011
Posts: 10
Hi,
I have developed an application and want to deploy it as an applet via servlet authentication and jsp presentation.

The frustrating part is that the applet loads on one computer and not on another.

Both computers are running Windows 7, Java 7, Tomcat 7 and the security policy has had a new policy file with added to java.security in the jre/lib/security directory.

The only difference between the two computers is that one is running Firefox 3.6 and the other is running Firefox 8.

The applet loads beautifully on the machine with FF8 but not the one with FF3.6 (it runs forever before finally showing a class not found error). The webapp set up is exactly the same on both machines. Therefore, is this a FF issue? This is really beginning to irritate me.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
What do you mean by "webapp set up" - does your applet require a servlet container *on the machine* where the applet is running? If so, why?
Nam Ha Minh
Ranch Hand

Joined: Oct 31, 2011
Posts: 498

Which class not found? Can you post the stack trace?


PM Me If You Want to get Urgent Help on Java Programming
Faisal Ul-Haque
Greenhorn

Joined: Dec 02, 2011
Posts: 10
Tim Moores wrote:What do you mean by "webapp set up" - does your applet require a servlet container *on the machine* where the applet is running? If so, why?


There is no issues with needing a servlet container for the applet although parameters are generated by the authentication servlet which enables the applet to complete initialization or shunt the user back to the home page in the absernce of these parameters (as a security measure). I can see that my phrasing is not clear so what I meant by webapp setup is that the set up is as follows on both machines:

webapp/content/jsp/application.jsp

webapp/content/resources/lib/GSSTravelLimited.jar

Nam Bill wrote:Which class not found? Can you post the stack trace?


I have tried to get the stack trace again and spent nearly the last hour for the error to be displayed and gave up. The class not found is gsstl.applets.GSSTravelLimited. I am attaching the jar file (the class file IS in there under the correct structure) so I am at a loss.

The jsp code is as follows:




The frustrating part is why it loads on the FF8 machine but not on the FF3.6 machine.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

It could be a Firefox issue, I suppose. But are you seriously saying you put a policy file on those computers which says "Allow all applets access to everything on this machine"? That's rather a big security exposure, don't you think?
Faisal Ul-Haque
Greenhorn

Joined: Dec 02, 2011
Posts: 10
Paul Clapham wrote:It could be a Firefox issue, I suppose. But are you seriously saying you put a policy file on those computers which says "Allow all applets access to everything on this machine"? That's rather a big security exposure, don't you think?


That policy file is only "plugged in" during the time I am developing and "unplugged" at all other times. And while developing I don't go anywhere near applets other than my own. Unless I am very much mistaken, obtaining a "proper" certificate in future and signing the applet with it will not require playing around with the policy files.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
Faisal Ul-Haque wrote:There is no issues with needing a servlet container for the applet

No issue? You're requiring the users of your applet to install and run a servlet container? At least that's what I asked in my previous post. This sounds dubious to me.
Andrew Thompson
Ranch Hand

Joined: Aug 05, 2010
Posts: 77
    
    5
Faisal Ul-Haque wrote://\\..The frustrating part is that the applet loads on one computer and not on another.
//The only difference between the two computers is that one is running Firefox 3.6 and the other is running Firefox 8.


Time to remove the browser from the equation. Launch the applet using Java Web Start


Andrew Thompson
http://pscode.org/
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Faisal Ul-Haque wrote:Unless I am very much mistaken, obtaining a "proper" certificate in future and signing the applet with it will not require playing around with the policy files.


That's true. So if you plan to distribute a signed applet, then test a signed applet. Self-signing costs nothing except your time. At this point whether you applet works with a policy file or not is irrelevant as far as I'm concerned.
 
Consider Paul's rocket mass heater.
 
subject: Applet loading issues