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

The sting operation

There was a guy in school named Subroto Giri, who, we all agreed, was the world's most accident prone person. All the world's ill luck would strike him first before affecting others. We sympathized with him, though we couldn't help occasionally taking a dig at the poor guy. I guess Murphy's law of averages has finally caught up with me. It's now my turn to be the butt of the jokes of my acquaintances. I went to HDFC Bank to sort 2 issues. One was sorted, the other had to wait. It was during my trudge back to my office that I made the mistake of putting my left hand into a hip pocket. Unknown to me, a bee had conveniently lodged itself there. No sooner had I made the intrusion than the bee stung me! My thumb, to be more precise. It felt like my thumb had been amputated. I did the obvious and withdrew my hand with a jerk, not knowing what had hit me. Getting a semblance of what had just happened, I realized to my consternation that the sucker could still be 'in...