This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Tomcat 404 error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 404 error" Watch "Tomcat 404 error" New topic

Tomcat 404 error

Ishitha Dyanil

Joined: Jan 18, 2012
Posts: 12


I'm new to servlets and I'm running servlets using tomcat.
I installed tomcat new version tomcat 7.0.23. I did run some servlets using tomcat they did work well..I did tried some examples on servlets using cookies and some basics.
They all worked well using same tomcat..
Now I'm trying to work on sessions..topic..I wrote simple session program.Followed same web.xml.Everything fine in Deploying..
When I'm opening them in the browser using the container of tomcat..It is not recognizing my application directory.
but tomcat is working well and good..

So I don't understand what is the problem with my directory.Upto some applications it worked well..and try to run same old servlets It is not recoginizing!!giving 404 error..!!

can any one help me please...

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63227

Perhaps, just maybe, you could share with us some of the details of how you deployed the web app?

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ishitha Dyanil

Joined: Jan 18, 2012
Posts: 12

Thanks for replying...Sure..
My Application directory is :



all servlets are here



classes are here


and my forms are here


and my web.xml is

Upto cookies it worked well.I mean container did recognize my folder when I tried to run session..It stopped to identify my folder and when I am trying to run older simple servlet,then also it is not identifying my folder.
I'm using Internet explorer.
Can you please tell me what couble the problem?
Rob Spoor

Joined: Oct 27, 2005
Posts: 20080

For your information, code tags use [ and ], not < and >. I've fixed that for you. But you haven't answered Bear's question - how is the application deployed. Just putting the files and folders in the right location doesn't mean the application is deployed.

How To Ask Questions How To Answer Questions
Ishitha Dyanil

Joined: Jan 18, 2012
Posts: 12

I deployed the same way that has explained in the Head First Servlets&Jsp book.
I followed the .do of my form ie .html to match in the web.xml and I also the servlets to match up.
so my deploying directory is in tomcat as I shown in my last post.

So am I correct for deploying? or there is another way?
Can you please tell me.
Have you checked out Aspose?
subject: Tomcat 404 error
It's not a secret anymore!