By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,592 Members | 1,931 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,592 IT Pros & Developers. It's quick & easy.

problem in mentioning servlet name in web.xml

P: 45
Hi,

I am using eclipse IDE. I created a dynamic web project, under that I created a HTML page in which I mentioned my servlet logical name as
Expand|Select|Wrap|Line Numbers
  1.  <form action = "SelectCoffee.do"> 
and then I created a servlet class under the same project and named it as "CoffeeSelect". In the web.xml file, I mentioned

Expand|Select|Wrap|Line Numbers
  1. <servlet>
  2.    <servlet-name>Ch3 Coffee</servlet-name>
  3.    <servlet-class>CoffeeSelect</servlet-class>
  4. </servlet>
  5.  
  6. <servlet-mapping>
  7.   <servlet-name>Ch3 Coffee</servlet-name>
  8.   <url-pattern>/SelectCoffee.do</url-pattern>
  9. </servlet-mapping>
  10.  
When I am running my html page (I called it form.html), it displays a drop down menu from where user can select one item and hit on the submit button. Once, the user hits the button, request object should be sent to the servlet. But, it shows the following error message

HTTP Status 404 - /Chapter_3/CoffeeSelect

type Status report

message /Chapter_3/CoffeeSelect

description The requested resource (/Chapter_3/CoffeeSelect) is not available.


I understood that it is not able to find the file but I am not able to fix it.

Somebody please help me in solving this problem.

Thanks,
KiranJyothi
Mar 21 '11 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.