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

applet inside tomcat please

Juwonlo Ibigbami
Ranch Hand

Joined: Nov 03, 2006
Posts: 83
Please i have a jar file containing my classes and i want to deploy it the a tomcat. I have tried it locally and it is working but it isn't working when i tried all i could in tomcat.

The error message is "Loading applet failed", "ClassNotFoundException:....."

Please, where do i place the jar file (WEB_INF i guess), how to call the class and the archive from my html page.

Help me out please.
Expecting soonest

Juwon Ibigbami
[ September 25, 2008: Message edited by: Ulf Dittmer ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41889
    
  63
Please don't ask specific members of the community for help. We have many knowledgeable folks hanging out here, and we don't want to give the impression that some people's input might not be welcome.

Nothing that's inside of WEB-INF will be served to a client, so that won't work. It's best to keep the classes and/or jar files in the same directory as the HTML file containing the applet tag.

For further details about the applet tag see http://faq.javaranch.com/java/AppletsFaq#tag
[ September 25, 2008: Message edited by: Ulf Dittmer ]

Ping & DNS - my free Android networking tools app
Juwonlo Ibigbami
Ranch Hand

Joined: Nov 03, 2006
Posts: 83
Originally posted by Ulf Dittmer:
Please don't ask specific members of the community for help. We have many knowledgeable folks hanging out here, and we don't want to give the impression that some people's input might not be welcome.

Nothing that's inside of WEB-INF will be served to a client, so that won't work. It's best to keep the classes and/or jar files in the same directory as the HTML file containing the applet tag.

For further details about the applet tag see http://faq.javaranch.com/java/AppletsFaq#tag

[ September 25, 2008: Message edited by: Ulf Dittmer ]


Sorry about that, i never knew.

Please i have done all i could but nothing is working. working locally bu not working with http://
Could there be some of this evaluated libs that will not work with http://

i put the jar,html and txt files in thesame folder but.....

Juwonlo Ibigbami
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41889
    
  63
Post the complete directory layout, as well as the applet tag in the HTML page.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16068
    
  21

Applets are no different in Tomcat than in any other J(2)EE-compliant webapp. What works for Tomcat also works for JBoss, WebLogic, JOnAS, etc.

An applet is (preferably) packaged in one or more Java JAR files that are downloaded to the client.

The key word there is downloaded.

In other words, the same rules apply as for image files, CSS, JavaScript files and so forth. If you put the JAR in a place where it can be downloaded and setup your applet tags to refer to it, the applet should be executable (assuming the user's browser has Java applet capability).

As Ulf pointed out, WEB-INF and its directories aren't suitable, since aything you put under WEB-INF can't be downloaded.
[ September 26, 2008: Message edited by: Tim Holloway ]

Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: applet inside tomcat please