I have a directory structure like this:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps
webapps comes with the following folders:
balancer
servlets-examples
jsp-examples
tomcat-docs
ROOT
webdav
I creat a directory under webapps called deepanjan...and fill it with some files/folders. I restart Tomcat. I suspect it's not able to detect my folder. How can the problem be rectified?
C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps
webapps comes with the following folders:
balancer
servlets-examples
jsp-examples
tomcat-docs
ROOT
webdav
I creat a directory under webapps called deepanjan...and fill it with some files/folders. I restart Tomcat. I suspect it's not able to detect my folder. How can the problem be rectified?
Comments
C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\deepanjan\WEB-INF folder. It lies within the deepanjan\WEB-INF folder...so we're back 2 square 1!
Anyway, the problem is solved if I replicate my directory structure under deepanjan under a pre-existing directory like servlets-examples. Obviously the problem lies with deepanjan's visibility to Tomcat.
http://localhost:8080/deepanjan/myhtml.html
(It's not working)
However, when I write:
http://localhost:8080/servlets-examples/myhtml.html
it works fine.
Anyway, I hope to demystify the anomalies in the days to come.
Thnx!
Case 1:
Since the Tomcat Comes with default settings there is a specific area(WEB-INF) under which you should put your files. So when you created an file it tries to fetch from those ocurrences.
Now you rectified it by copying the entire directory structure, This is because now tomcat treats your directory as project in which you have all your files,and mapping is done.
case 2:
The way Sittu was talking about.. The web.xml.. Explicitly specifying the area of your files ton start from will also work..
-Welcome to J2EE Community...