aspose file tools*
The moose likes Applets and the fly likes Applet not giving output Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet not giving output" Watch "Applet not giving output" New topic
Author

Applet not giving output

Ravindra Rana
Greenhorn

Joined: Sep 10, 2008
Posts: 10
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
Marshal

Joined: Mar 22, 2005
Posts: 41905
    
  63
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.


Ping & DNS - my free Android networking tools app
Ravindra Rana
Greenhorn

Joined: Sep 10, 2008
Posts: 10
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....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet not giving output