I am writing a simple web application. I have one
JSP and one
servlet.
The code in JSP is
<html><head><title>Login Page</title></head>
<body>
<font size='5' color='blue'>Please Login</font><hr>
<form action='/valid.do' method='post'>
<table>
<tr><td>Name:</td>
<td><input type='text' name='employeeId'></td></tr>
<tr><td>Password:</td>
<td><input type='password' name='password' size='8'></td>
</tr>
</table>
<br>
<input type='submit' value='login'>
</form></body>
</html>
I have a ActionServlet class.
I want this index page be handled by this ActionServlet.
My web.xml has the following code:
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>logic.ActionServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
But when I press submit button in index page, I am getting /valid.do is not availabel.
How to get rid of this problem?
Please help me.