aspose file tools*
The moose likes Applets and the fly likes Signing applet cab file for I.E. problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Signing applet cab file for I.E. problem" Watch "Signing applet cab file for I.E. problem" New topic
Author

Signing applet cab file for I.E. problem

Paul Bork
Greenhorn

Joined: Mar 31, 2006
Posts: 2
Hi,
We've have an application that has an applet to print label and barcodes to a Smart Lable Printer model 100. It works fine in I.E. when running under SUN's JDK and modifying the policy.java security file to grant permission to the application http//server. It also runs under the MS JVM in I.E. whem modifying the advance setting and using custom options. The problem is that the users desktops a locked down (crippled) so that custom setting can not be used and SUN's JDK can not be used. To try and get around this I created an applet .cab file and signed it with Authenticode and changed the applet code as follows;

Original code(works fine when modifying policy.java)
APPLET_BEGIN_TAG = "<applet CODE=\"com/wfsc/rush/barcode/SLPApplet.class\" CODEBASE=\"../../\" ARCHIVE=\"slp_applet.jar\" HEIGHT=\"0\" WIDTH=\"0\">";

Modified code for cab file;
APPLET_BEGIN_TAG = "<applet CODE=\"com/wfsc/rush/barcode/SLPApplet.class\" CODEBASE=\"../../\" HEIGHT=\"0\" WIDTH=\"0\"> <PARAM name=\"cabbase\" value=\"slp_applet.cab\">";

When the applet is called, the Authenticode dialog box appears as would be expected and after clicking RUN the applet does not load. The java console reports the following;

Microsoft (R) VM for Java, 5.0 Release 5.0.0.3810
==============================================
? help
c clear
f run finalizers
g garbage collect
m memory usage
q quit
t thread list
==============================================
java.lang.ClassNotFoundException: com.wfsc.rush.barcode.SLPApplet
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/vm/loader/URLClassLoader.loadClass
at com/ms/applet/AppletPanel.securedClassLoad
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.processSentEvent
at com/ms/applet/AppletPanel.run
at java/lang/Thread.run

The SLPApplet class file and slp_applet.cab file are in the correct locations. What could be causing the applet not to be found?

Thanks
Paul
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42641
    
  65
Can you observe the network traffic to see whether the CAB file is actually downloaded? Can you download it manually?


Ping & DNS - my free Android networking tools app
Paul Bork
Greenhorn

Joined: Mar 31, 2006
Posts: 2
Actually, I'm testing this locally on my pc as a local host using Tomcat and I can manually see and access all the files.

Paul
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42641
    
  65
By "download" I meant download over HTTP, which is what the applet would be doing. I've never used the cabbase attribute, so I don't know how it interacts with the codebase attribute. You can take a look at the Tomcat logs to see whether it gets downloaded, and from which location the JVM actually tries to download it.
 
 
subject: Signing applet cab file for I.E. problem