This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Applets and the fly likes How do I call an applet from a JSP? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "How do I call an applet from a JSP?" Watch "How do I call an applet from a JSP?" New topic
Author

How do I call an applet from a JSP?

Mark Jones
Greenhorn

Joined: Aug 28, 2003
Posts: 13
Hi,

I want to call a simple applet from a JSP within Tomcat 5.5. However, when I try and run the JSP, I get the following error:

"java.lang.ClassNotFoundException: orgChart.class"

My code is very simple:-

<applet code="orgChart.class" width=610 height=400>
<param name="nodes" value="10">
<param name="1" value="1|Mary|0|2|0|0">
<param name="2" value="2|John|1|0|3|1">
<param name="3" value="3|Michael|1|6|4|1">
<param name="4" value="4|Paul|1|8|5|1">
<param name="5" value="5|Suzy|1|0|0|1">
<param name="6" value="6|Diane|3|0|7|2">
<param name="7" value="7|Samuel|3|0|9|2">
<param name="8" value="8|Alex|4|0|0|2">
<param name="9" value="9|Jennifer|3|0|10|2">
<param name="10" value="10|Andrew|3|0|0|2">
</applet>

Tried serving the class off a /static folder in the webapp too but to no avail. Any ideas please?

Thanks
Mark


-----------------------------------------<br />Sun Certified Java Programmer Platform 2<br />Sun Certified Java Developer Platform 2
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56191
    
  13

Moved to the Applets forum.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35241
    
    7
Are the classes in the same directory as the JSP file? Does it work if you replace the JSP by a static HTML page of the same content?


Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How do I call an applet from a JSP?
 
Similar Threads
few more doubts
Images not shown in Applet
I have a doubt in oracle!
Only Numeric value allowed
Applet