Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Applet Codebase issue  RSS feed

 
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.
 
Bartender
Posts: 9559
12
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
 
The human mind is a dangerous plaything. This tiny ad is pretty safe:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!