Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet Codebase issue

 
Jayesh Netravali
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I had written a standalone TicTacToe game in swing and then modified it to run as an Applet. It runs fine when I open the HTML which has the <Applet> tag. The class file of my java code is placed in the same directory.
I tried putting this HTML on the Tomcat server under one of the web applications (tictactoe) under webapps. I have put the class file for the Applet under WEB-INF\classes under tictactoe. i.e webapps\tictactoe\web-inf\classes
What do I need to give the 'codebase' as? Since my applet class does not have any package structure I tried omitting the codebase parameter from the <APPLET> tag but I am getting ClassNotFoundException.

Thanks in advance.

Jayesh.
 
Joe Ess
Bartender
Posts: 9340
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Put your class file somewhere other than WEB-INF. WEB-INF is a special case. It contains server-side files like servlets and it is inaccessable through the web server.
 
Jayesh Netravali
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Joe. It worked when I moved my class files to a directory outside WEB-INF. Got to know a little bit more about WEB-INF today

Thanks again

Regards,
Jayesh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic