problem in mentioning servlet name in web.xml

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • KiranJyothi
    New Member
    • Apr 2007
    • 45

    problem in mentioning servlet name in web.xml

    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
    Code:
     <form action = "SelectCoffee.do">
    and then I created a servlet class under the same project and named it as "CoffeeSele ct". In the web.xml file, I mentioned

    Code:
    <servlet>
       <servlet-name>Ch3 Coffee</servlet-name>
       <servlet-class>CoffeeSelect</servlet-class>
    </servlet>
    	
    <servlet-mapping>
      <servlet-name>Ch3 Coffee</servlet-name>
      <url-pattern>/SelectCoffee.do</url-pattern>
    </servlet-mapping>
    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
Working...