• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:
  • Lou Hamers
  • Piet Souris
  • Frits Walraven

How to invoke applet from a JSP?

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Message for you sir! I think it is a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic