• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

can't access class files under WEB-INF

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can anyone help me with this problem?
Is there any setting at Tomcat or Apache to disable accessing WEB-INF directory?
Because I can access jsp, but unable to run servlet or accessing class under WEB-INF from this jsp. The chmod is 755, but still i cant access it.
thanks.
Wahana.
 
Ranch Hand
Posts: 1179
Mac OS X Eclipse IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need a folder named 'classes' in the WEB-INF where you put all *.class and you need to configure the servlets in web.xml
/Rene
 
L. Wahana
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I created classes folder under WEB-INF, and I also defined servlet and servlet mapping at web.xml. But, still doesnt work.
In my local machine it worked fine, but not in my ISP machine. I have no idea how to solve this problem. There may be a configuration file that I need to set up.
Wahana.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If your classes are not in a package, this could be the problem. When some servers see a class in the default package they look in the wrong place.
Bill
 
L. Wahana
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I did put the class in a package.
I found that there is examples.war running in my ISP machine. The difference with my web application is:
My web application is linked (using soft link) from tomcat/webapps directory.
Examples web-applications is physically under web-apps.
My ISP machine is using Red Hat Linux.
Wahana.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic