Application Server Solutions for Microsoft IIS and ASP.NET
       solutions   products   partners   company   support   downloads         store
ServletExec Self-Help: FAQ
Back to Search >  Back to Search Results

Faq ID 137
Product ServletExec
Category Web Application
Question My browser fails to execute my Applet when the Applet resides inside a Web Application. What is wrong?
Answer First, view the source of the HTML in the browser window to examine the reference to the applet.
Make certain that the link to the Applet that the browser is trying to interpret is correct.
Keep in mind, a leading forward slash is interpreted by the browser to be the Web Server's Document root (not the web app's document root).
If there is no leading forward slash in the code attribute of the <applet> tag then the browser will attempt to locate the .class or .jar file for the Applet relative to where it thinks the HTML was served.
If the HTML received by the browser was served from a Web Application then you may need to alter the reference accordingly. If this is not the problem then check your browser's Java Console for error message output.
If the Java Console for your browser mentions:
Then most likely you need to add some mime-mapping entries to you Web Application configuration.
In this case you would need to add the following mappings:

class  ->  application/java-vm
jar    ->  application/java-archive

This way ServleExec will understand how to serve .class or .jar content from the Web Application to the client.

If you use the Main ServletExec admin UI to create a new, empty web application (pointing to an empty folder or a folder that does not yet exist), then SE will actually create the basic folders for you (WEB-INF, lib, classes) and will also create a basic web.xml file for you, which contains a few basic mime mappings. You could then use these basic mime mappings as an example for adding the mappings mentioned earlier in this FAQ.

company media information terms of use privacy policy contact us