0

i am calling applet jar file like this

out.println("<APPLET code = com.Sample.class " +
		"codebase = /WebContent/WEB-INF/" +
		"archive = SamplePassword_signed.jar " +
		"WIDTH = 200" +
		"HEIGHT = 350>" +
		"</APPLET>");

but it gives me a error that class path :
class com.Sample.class not found.
i have stored applet jar in web-inf folder . i am using eclipse as IDE please help me to get out put

Edited by peter_budo: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)

3
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by sharathk60
0

Sharath,
When you specify "codebase = /WebContent/WEB-INF/" the browser will serach for the Class file of your Applet in the "/WebContent/WEB-INF/" in the directory in which it is running on the client machine where your servlet output is being displayed, it does not look for the class file on the server where your servlet is deployed.

For the browser to look for your applet class on the server, you need a URL of the type "http://...../" to your "codebase".

Here is what I am trying to say.

Also the class file of your applet will need to be moved out from the WEB-INF directory and into another folder from where the browser can access it via the "http://...." URL pattern

Also this should also prove somewhat useful.

Also please use code tags from the next time whenever you post any code.

Edited by stephen84s: n/a

0

And please be careful in your problem description.
You're not calling an applet from a servlet, you're including an applet tag in the output generated by a servlet.

0

thank u very much ... i wll try with that

Sharath,
When you specify "codebase = /WebContent/WEB-INF/" the browser will serach for the Class file of your Applet in the "/WebContent/WEB-INF/" in the directory in which it is running on the client machine where your servlet output is being displayed, it does not look for the class file on the server where your servlet is deployed.

For the browser to look for your applet class on the server, you need a URL of the type "http://...../" to your "codebase".

Here is what I am trying to say.

Also the class file of your applet will need to be moved out from the WEB-INF directory and into another folder from where the browser can access it via the "http://...." URL pattern

Also this should also prove somewhat useful.

Also please use code tags from the next time whenever you post any code.

0

hi i have a problem i have to call applet from servlet and then from applet i have to call jsp when i click a button in applet.. please give a sample code for this and also how to send parameters from servlets to applet and applet to jsp

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.