In ASP, there\'s request.form and request.queryString attributes, but in Java. It seems like we have only one collection, which can be accessed via
If you are writing a servlet, you can make that distinction by whether the doGet or doPost method is invoked.
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException{
//Set a variable or invoke the GET specific logic
handleRequest(request, response);
}
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException{
//Set a variable or invoke the POST specific logic
handleRequest(request, response);
}
public void handleRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException{
//Do stuff with the request
}