A question on Tomcat

I have a directory structure like this:
C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps

webapps comes with the following folders:

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?


Prateek said…
Try to do something in the deployment descriptor file i.e the xml file or something like that.
deepanjan said…
The Deployment Descriptor exists in
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.
sittu said…
suppose u have deepanjan folder under webapps, what url r u typing to access, say test.jsp which is directly inside deepanjan?
deepanjan said…
This is what I type in the address bar of my browser:
(It's not working)

However, when I write:
it works fine.
sittu said…
Can u plz from conf/web.xml, tell what is written in servlet tag and servlet-mapping tag. there may be more than one occurance of such tags.
deepanjan said…
conf/web.xml is HUGE.
Anyway, I hope to demystify the anomalies in the days to come.
Anonymous said…
Deepanjan I work on WebLogic so i may not be sure of the exact reason but i guess:
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...

Popular posts from this blog


The pain must end

RIP Yahoo!