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

Post Christmas

The workday didn't have the sweetest of starts. After being made to wait for almost half-an-hour for breakfast in the cafeteria, I was told only when I enquired that there could be no omelette since the heater wasn't working properly. I lost my temper and aired my annoyance not because the heater was out-of-order but because I was needlessly made to wait for something that was just not about to happen. The onus was on them to intimate me and they failed to own up to their responsibility. I find this attitude very irksome. Anyway, the rest of the day was smooth sailing except for a minor glitch that had to be rectified just when I was about to head for lunch. The bay was mostly deserted since most of my colleagues had volunteered for a training. I'm self-taught...thus my being an exception to the mass exodus! Nilotpal is on a fortnight-long leave and I missed him dearly today.
I'm learning the hard way not to trust anyone. Even the one you revere the most may be scheming your downfall. By no stretch of imagination may this seem logical, but who said imagination is limitless?