This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
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

Applets in WEB-INF directory

 
omar khan
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can I load an applet from web-inf directory? I am using Tomcat 3.2.1 and it seems to me the loading is inhibited.
 
Ranjana Sharma
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Omar,
Try loading the applets from the classes
directory under WEB-INF directory.It will work.
Thanks.
Ranjana
Originally posted by OMAR KHAN:
Can I load an applet from web-inf directory? I am using Tomcat 3.2.1 and it seems to me the loading is inhibited.

 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a very strange thing to want to do. In most web applications, applets should not be placed under WEB-INF, that is just for classes and application resources used only on the server. Applets need to be placed somewhere where the server can serve them to the client, such as the same place as yout HTML or JSP files.
 
omar khan
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Rajana
Hello Frank
I agree with you that putting my applets under WEB-INF/classes is
strange, but I am moving to Tomcat from JRun 2, which was not servlets 2.2 compliant. My applets -ok they are not really mine, I have inherited the application- have classes in common with my servlets and I was wondering if I have to redesign the application (not as difficult as it sounds) or I just can keep the things as they are now and configure Tomcat to cope with this unusual situation. I read the servlets2.2 specifications and nowhere I found that applets must not be deployed in WEB-INF/classes. Furthermore I browsed lots of forums and most people around say that applets -conceptually- are just like .gif, that is to say they should be deployed in the same directory as the HTMLs or in a subdirectory under it.
Have you got any clue?
[This message has been edited by OMAR KHAN (edited March 27, 2001).]
[This message has been edited by OMAR KHAN (edited March 27, 2001).]
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The difficulty with deploying applet code in WEB-INF/classes is that you should never make WEB-INF/classes visible to the webserver, otherwise potentially secret or damaging server-side code is available to all users.
If the shared applet classes are all grouped in a package , then you might consider making a link from a web-visible directory to the package directory, otherwise you will really have to maintain two copies of the shared class hierarchy - one copy safe in WEB-INF/classes, hidden from view with all the server-side code, and one copy somewhere visible for users to download as an Applet.
 
Ashik Uzzaman
Ranch Hand
Posts: 2373
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What I did is made my applet a jar and just copied it in the home directory of my web application. Works fine.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic