Hi all,,

i am having three files

one html file named add.html which contains

<html>
<head>
<title>Addservlet</title>
<Body bgcolor="gray">
<STYLE type="text/css">
H1 { text-align: center}
</STYLE>



<font ><h1>ADDSERVLET</h1></font>
<form action="/addservlet"
method="POST">
Number One
&nbsp;&nbsp<input type="Text" name="number1">
<br><br>Number Two
&nbsp;&nbsp<input type="text" name="Number2">
<br><br><input type="submit" value="Submit">
<input type="reset" value="Reset">
</form>
</body>
</head>
</html>


and one web.xml file contains


<web-app>
<servlet>
<servlet-name>addse</servlet-name>
<servlet-class>addservlet</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>addse</servlet-name>
<url-pattern>/addservlet</url-pattern>
</servlet-mapping>
</web-app>


one servletfile which contains

import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
public class addservlet extends HttpServlet
{


public void post(HttpServletRequest req,HttpServletResponse resp)throws IOException,
{
int no_one,no_two,result;
resp.setContentType("text/html");
PrintWriter p=resp.getWriter();
no_one=Integer.parseInt(req.getParameter(no_o));
no_two=Integer.parseInt(req.getParameter(no_t));
result=no_one+no_one;
p.println("Result"+result);
}


how can i link all these three...to form a servlet.help me i am new to this