This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: Calling Applet from JSP! Urgent Please!
It's not a secret anymore!