It's not a secret anymore!
The moose likes Servlets and the fly likes how to run applet in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to run applet in servlet" Watch "how to run applet in servlet" New topic

how to run applet in servlet

utpal kumar bhowmick

Joined: Jan 26, 2002
Posts: 1
i can't run applet in servlet.for that what i have to.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

Nice terse question. What means?

An IDE is no substitute for an Intelligent Developer.
Graeme Brown
Ranch Hand

Joined: Oct 13, 2000
Posts: 193
Applets run on the client.
Servlets run on the server.
Are you trying to run them both in the same virtual machine? This would not make sense.
Or are you having problems embedding an applet in the HTML output from the servlet?
Vikas Aggarwal
Ranch Hand

Joined: Jun 22, 2001
Posts: 140
Same way as you run applat in an html. The class file should reside in the webroot directory of the server where you keep all of your htmls. Now in the servlet use the HTML applet tag with code case and the path. The path will the virtual path to you class file like This will make the applet run. Also the params can be provided as usual.

Vikas Aggarwal

Founder @
Leads and Deals Limited
I agree. Here's the link:
subject: how to run applet in servlet
It's not a secret anymore!