Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes jsp loading applet using java plug-in Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "jsp loading applet using java plug-in" Watch "jsp loading applet using java plug-in" New topic
Author

jsp loading applet using java plug-in

arul narayan
Greenhorn

Joined: Sep 26, 2000
Posts: 17
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).]


arul.
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

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

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
arul narayan
Greenhorn

Joined: Sep 26, 2000
Posts: 17
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

Joined: Jun 03, 2000
Posts: 5040

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp loading applet using java plug-in
 
Similar Threads
jsp:plugin using applet & mayscript
Unable to play media inside my JSP
Problem with inter-applet communication
Applet-Integration in a JSF/Facelets application
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver while executing applet on a web page