send.jsp
<html>
<head>
<title>send parameter</title>
</head>
<body>
<form action="getCanshu.jsp method="get">
first:<input type="text" name="first">
second:<input type="text" name="second">
<input typr="submit" value="fasong">
</form>
</body>
</html>
getCanshu.jsp
<html>
<head>
<title>get the parameter</title>
</head>
<body>
<%
String firstNum=request.getParameter("first");
String secondNum=request.getParameter("second");
int first=0;
int second=0;
try{
first=Integer.parseInt(firstNum);
second=Integer.parseInt(secondNum);
}catch(Exception e){
%>
<h1>input error</h1>
<%
}
%>
<%=first%>
<%=second%>
</body>
</html>