Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat 404 error

 
Ishitha Dyanil
Greenhorn
Posts: 12
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64970
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Perhaps, just maybe, you could share with us some of the details of how you deployed the web app?
 
Ishitha Dyanil
Greenhorn
Posts: 12
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20550
57
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Ishitha Dyanil
Greenhorn
Posts: 12
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic