Forums Register Login

error - HTTP Status 404 - /EmailList/

+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send


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?
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
What is the full path to your HTML file (starting with the drive letter of your hard drive)?
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
After packaging your classes and changing your web.xml file, did you restart your app or Tomcat?
+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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!
+Pie Number of slices to send: Send
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 ]
+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
Glad it's working for you.
Thanks for posting back with the solution.
+Pie Number of slices to send: Send
That's great Vaishali

Thanks for posting back with the solution. It may help others with a similar issue.
Arthur, where are your pants? Check under this tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1479 times.
Similar Threads
problem with this cookie program, getting a blank output
Stuck on HelloWorldServlet
Newcommer To Servlets!
Web.XMl in JSP
Not able to display starting jsp page index.jsp
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2024 23:12:04.