File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat 404 error" Watch "Tomcat 404 error" New topic
Author

Tomcat 404 error

Ishitha Dyanil
Greenhorn

Joined: Jan 18, 2012
Posts: 12

Hi,

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 directory..deployed..in 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...


Thanks!!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61450
    
  67

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
Greenhorn

Joined: Jan 18, 2012
Posts: 12

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

C:\Users\Krishna\Desktop\JAVA\Tomcat7\apache-tomcat-7.0.23\webapps\Sevlets-Practice

and

all servlets are here

C:\Users\Krishna\Desktop\JAVA\Tomcat7\apache-tomcat-7.0.23\webapps\Sevlets-Practice\com\example

and

classes are here

C:\Users\Krishna\Desktop\JAVA\Tomcat7\apache-tomcat-7.0.23\webapps\Sevlets-Practice\WEB-INF\classes\com\example

and my forms are here

C:\Users\Krishna\Desktop\JAVA\Tomcat7\apache-tomcat-7.0.23\webapps\Sevlets-Practice

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
Sheriff

Joined: Oct 27, 2005
Posts: 19725
    
  20

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.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Ishitha Dyanil
Greenhorn

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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Tomcat 404 error