Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jsp loading applet using java plug-in

 
arul narayan
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have a JSP form that has to load an applet using java-plugin. I have also added the code snippet below for reference.
Unfortunately I keep getting class not found exception. The classes are in a jar file. Is there a different syntax for such cases. Thanks.
<jsp:plugin type="applet"
code="packagename.appletclassname.class"
codebase="/pathOfArchive/"
archive="jarname.jar"
width="200"
height="100">
</jsp:plugin>

[This message has been edited by arul narayan (edited June 27, 2001).]
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

While this msg is more suitable for the Applet forum,
part of the answer that you may be interested is in the
archive tag explanation found on the Sun Tutorials page.
In the link above please see the explanation for the topic
Combining an Applet's Files into a Single File almost
at the end.
HTH. regds.
- satya
 
arul narayan
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The reason for posting in this forum is because the above code works perfectly fine if i use the following equivalent:
<OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" WIDTH = "300" HEIGHT = "100" >
<PARAM NAME="code" VALUE="packagename.appletclassname.class">
<PARAM NAME="codebase" VALUE="/path/">
<PARAM NAME="archive" VALUE="jarname.jar">
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.3">
but does not work in a JSP where <jsp:plugin> tag is provided to enable a JSP to load the java plugin.
The equivalent of the above without the plugin also works perfectly fine when given as below:
<APPLET WIDTH=100
HEIGHT=100
CODE="packagename.appletclassname.class"
CODEBASE="/path/"
ARCHIVE="jarname.jar">
</APPLET>
My requirement is to run the plugin applet from the jsp and hence i use <jsp:plugin> tag, but does not seem to find the class files from the jar.
Thanks for the reply, though.
 
Madhav Lakkapragada
Ranch Hand
Posts: 5040
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

It works when ....

<OBJECT classid="clsid: ......<BR>
.....-applet;version=1.3">


but does not work in a JSP where <jsp : plugin> tag is provided to enable a JSP to load the java plugin


Sure enough it doesn't work.<BR>
If you read the fine print, the default value (in the
use a plugin tag) for the jreversion is 1.1
In your OBJECT code which works, you seem to have specified
version 1.3. You need to specify this in you jsp plugin tag.
HTH.
regds.
- satya
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic