This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet inside tomcat please

 
Juwonlo Ibigbami
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Juwonlo Ibigbami
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post the complete directory layout, as well as the applet tag in the HTML page.
 
Tim Holloway
Saloon Keeper
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic