• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Applets in WEB-INF directory

 
Ranch Hand
Posts: 183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.


 
Sheriff
Posts: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7001
6
Eclipse IDE Python C++ Debian Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 2379
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
See ya later boys, I think I'm in love. Oh wait, she's just a tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic