• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

error - HTTP Status 404 - /EmailList/

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am trying to deploy a servlet.
It showing HTTPStatus404 error.
type Status report
message /EmailList/
description The requested resource (/EmailList/) is not available.


I created EmailList folder in webapps folder. index.html file in EmailList folder and List.class file in WEB-INF/classes folder

and my web.xml contain

can anyone help me?

Thanks

Vaishali
[ January 16, 2008: Message edited by: Vaishali Paramane ]
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Two issues:
1.) You've spelled your servlet-name "ListDisplayt" (note the 't' at the end).
2.) Your url-pattern is /simpleServlet. Is that what you are using when you try to access your servlet?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also, you're starting off on a bad foot by not packaging all of your Java class names. You might be able to get this servlet working without it being packaged but as soon as you start adding beans to your project, things are going to blow up on you.

The default package (no explicit package name) is for trivial command line apps, not web applications.
 
Vaishali Paramane
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks ben

I corrected it and add in package simple

In html file I wrote

Now html index file is display but when i submit it showing

HTTP Status 404 - /EmailList/simpleServlet error

--------------------------------------------------------------------------------

type Status report

message /EmailList/simpleServlet

description The requested resource (/EmailList/simpleServlet) is not available.

Thanks

Vaishali



[BSouther: Added UBB CODE tags]
[ January 16, 2008: Message edited by: Ben Souther ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the full path to your HTML file (starting with the drive letter of your hard drive)?
 
Vaishali Paramane
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My HTML file is stored in
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\EmailList\index.html


and it display fine on tomcat but when I am press submitt button for invoke servlet it showing error.

Thanks

Vaishali
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In your HTML, your form has no closing tag.

Have you changed the action attribute since you last posted the form?
Did you cut and paste the HTML to the ranch or did you type it?
 
Vaishali Paramane
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I copied and paste my html here.
Now I added form closing tab
but still it giving error

Thanks

Vaishali

[ January 16, 2008: Message edited by: Vaishali Paramane ]



[BSouther: Added UBB CODE tags]
[ January 16, 2008: Message edited by: Ben Souther ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
After packaging your classes and changing your web.xml file, did you restart your app or Tomcat?
 
Vaishali Paramane
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes I did
I am using tomcat6.0.2.
Thanks
Vaishali

[ January 16, 2008: Message edited by: Vaishali Paramane ]
[ January 16, 2008: Message edited by: Vaishali Paramane ]
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The error message you're posting doesn't match the url that you've posted.

type Status report
message /EmailList/simpleServlet
description The requested resource (/EmailList/simpleServlet) is not available.


doesn't match
 
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, i noticed the change in url-pattern but waited to read till the end. There Ben exactly asked for the same.

You need to just look at the url string what you have in your form action! that's where probably it would have gone wrong!
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The URL in the form's action attribute is not necessarily wrong.
It just doesn't match the URL given in the error message.
I'm wondering if you're either editing the wrong file or if you're not giving us the the most up to date information.

In order to get that error message, the URL in the form's action attribute would have to be "/EmailList/simpleServlet" or "/simpleServlet".

Either that or your HTML page is in webapps/ROOT/EmailList instead of being in webapps/EmailList.

Something on your server isn't matching what you're posting here.
[ January 17, 2008: Message edited by: Ben Souther ]
 
Vaishali Paramane
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Ben

I gave correct information but my web.xml is EmailList directory outside the WEB-INF.
Now I moved web.xml in WEB-INF directory and its working .

second one I was compiled java file in jdk1.6 and my tomcat has set path of java jar1.5.
Now my problem solve.

Thanks for help.

I stucked this point from last week and only for your help I solved.
Really thanks.

Thanks

Vaishali
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Glad it's working for you.
Thanks for posting back with the solution.
 
Raghavan Muthu
Ranch Hand
Posts: 3389
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's great Vaishali

Thanks for posting back with the solution. It may help others with a similar issue.
 
I like you because you always keep good, crunchy cereal in your pantry. This tiny ad agrees:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic