wood burning stoves 2.0*
The moose likes Servlets and the fly likes Calling Applet from JSP! Urgent Please! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Calling Applet from JSP! Urgent Please!" Watch "Calling Applet from JSP! Urgent Please!" New topic

Calling Applet from JSP! Urgent Please!

Krishna Nagesh

Joined: Jul 24, 2001
Posts: 6
Hi all,
I would like to know ,how can I embed an applet class in to JSP page. I know of calling class file using "use bean id".
Please reply ASAP.
Thanks & Regards
Matt Gregory

Joined: Jul 24, 2001
Posts: 8
I don't really think you can do that. You can send an HttpResponse to the applet, but I don't think you can call functions/classes on the applet from the server.
You might instead want to try invoking server commands from the applet and then getting back a response which effectively dictates the actions of the applet. In this way the server isn't invoking an action on the applet but it is telling the applet what to do next.
saurabh pathak

Joined: Jul 25, 2001
Posts: 6
hi nagesh
You use <jsp lugin> to use applets in jsp take this following code:
<jsp lugin type="applet" code="" codebase="" />
also other attributes are there like archive,jreversion and else but these all are optional and to passs parameters use
<jsp aram value="" /> to passsvalues in applet..
so bye
Krishna Nagesh

Joined: Jul 24, 2001
Posts: 6
Hai Pathak,
When I call using plugin type,it says no error and it is not picking the applet. I kept class files under "\root\Classes" as I keep regular class files. Is it the same for applet?. Please let me know. It is kind of very urgent!
Any help on this appreciated.
Thanks & Regards
Glen Tanner
Ranch Hand

Joined: Apr 16, 1999
Posts: 147

Are you specifying that root\Classes directory in the "codebase" tag?
Take a look at the <jsp Plugin> syntax here.
I agree. Here's the link: http://aspose.com/file-tools
subject: Calling Applet from JSP! Urgent Please!
Similar Threads
activating an applet after clicking submit button. . .
DB connection from swings
WebLogic server:ClassCircularityError
showing applet embedded in jsp
calling beans from jsp