Recieve parameters
Revieving parameters either it is a post or get is easy.
<%
String myName = request.getParameter("name");
%>
The request.getParameter("String"); always returns a String object.
To convert a int value you can parse it by Calling Integer.parseInt();
<%
String strId = request.getParameter("strId");
int myId = -1;
if(strId!=null){
myId = Integer.parseInt(strId);
}
%>
If myId still is -1 the parameter was not sendt, and you can do your error handling.
You can also put a try catch block around the Integer.parseInt to catch a non numerical value.