Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet not giving output

 
Ravindra Rana
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using Eclipse IDE for my tomcat project.
problem is that when i run my html file inside tomcat then there is no output in Browser window even status bar shows that Applet started...

i am drawing a Chart using my applet file for that i m using jfreechart jar file.

i make a dir in my tomcat project where i placed my applet class file and my html file remains in my tomcat project...

<html>
<body>
<applet code="ChartApplet.class" codebase="/WebThreads/AppletFiles" archive="/WebThreads/jfreechart-1.0.10.jar" width="300" height="300">
</applet>
</body>
</html>


-->here WebThreads is my tomcat project dir and my applet class remain in AppletFiles

for running this code i am using....

http://localhost:8040/WebThreads/StartApplet.html

Thanks in advance...
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch.

Both codebase and archive are relative paths, so they should not begin with "/" (which makes them absolute paths on Unix, and may not have any meaning on Windows).

I advise to keep all applet files in the same directory, and then to run it not within an IDE, but in a browser. It's easier to sort out classpath problems like these that way. Any error messages you get would end up in the Java Console.
 
Ravindra Rana
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Finally i got the CUP

here's my html file code

<html>
<body>
<applet code="ChartApplet.class" codebase="/WebThreads/AppletFiles" archive="chartapplet.jar,jfreechart-1.0.10.jar, jcommon-1.0.13.jar" width="300" height="300">
</applet>
</body>
</html>

I put my all stuff in AppletFiles dir in my WebThreads Tomcat project...
and things gone easier....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic