• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to invoke applet from a JSP?

 
george vasanth
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have an applet which is in a jar file invoked from a JSP running in weblogic.

I use the following tag for invoking the applet in the JSP.

<APPLET code="BarChart.class" archive="BarChart.jar" width=500 height=500></APPLET>

But I get a ClassNotFoundException for the applet class.

Is there a specific location in which i have to put the jar file containing the applet or is there a change in the tag used to invoke the applet?

Any pointers or suggestions would be of great help.

Thanks in advance.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The class files should be in the same place as the JSP, not in WEB-INF/classes or WEB-INF/lib. Those directories are only for classes that run on the server, whereas your applet classes are, as far as the webapp is concerned, just dumb data to be shipped to the browser on request. So the class files have to be in a public document directory, such as where the JSP is, so the browser can ask for them and they can be served by the web server.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
George-

Before you started this thread, I answered your question in a private message. Next time you have a question, consider more carefully where and how you post it, or people will get the idea that you're taking liberties with their time by duplicating effort.
[ November 03, 2005: Message edited by: Ulf Dittmer ]
 
george vasanth
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ernest and Ulf for your suggestions. I was able to solve the problem with your help.Apologize for duplicating the post. Would be careful henceforth.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic