• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Tomcat 404 error

 
Greenhorn
Posts: 12
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!!
 
Sheriff
Posts: 67637
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Sheriff
Posts: 22650
126
Eclipse IDE Spring VI Editor Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Politics is a circus designed to distract you from what is really going on. So is this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic