Skip to main content

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:
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

Anonymous 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.
saurabh 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:
http://localhost:8080/deepanjan/myhtml.html
(It's not working)

However, when I write:
http://localhost:8080/servlets-examples/myhtml.html
it works fine.
saurabh 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.
Thnx!
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 year that was

I'm wearing a rather striking shirt, one that makes me feel like a clown fooling around in a graveyard. Roving eyes latch on to me and make me too conscious of myself. Checkered in red, grey, black and maroon, I've excused myself into donning it and looking silly for two reasons. It's Friday and…more importantly, the last working day of the year. Tailored half-a-year back, I never had the courage to wear it, not until today. It's that time of the year when it's time to reflect on the events that transpired. Last year ended on the worst possible note. Dad had expired and I was numb with shock. The repercussions rippled halfway thought this year. Things were so abysmal initially that I had lost the will to live. Acrid in everything I did, I was immensely angered by time phlegmatically flowing through its cadence. It was as if Dad meant nothing to anybody. What right did people have to live the way they always had when Dad was no more? Why was much of the world still

It's been 10 years...

...since I last heard Willis Conover ! I managed to download a 2-minute live introduction to a jazz band by him today. It was divine hearing him after so many years. Old memories flooded my mind.

Zoya describes Lord Ganesha!

" ... short fat man with an elephant head " Zoya , that made me laugh real hard!