• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

can't access class files under WEB-INF

 
L. Wahana
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • 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.
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13073
6
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic