Java Reference
In-Depth Information
L ISTING 13.1
Continued
*/
protected void forward(HttpServletRequest request,
HttpServletResponse response,
String target) throws ServletException {
try {
ServletContext context = getServletContext();
RequestDispatcher dispatcher =
context.getRequestDispatcher(target);
dispatcher.forward(request, response);
}
catch (IOException ioe) {
throw new ServletException(ioe.getMessage());
}
}
/**
Calls the <code>doPost()</code> with the request and response.
*
@param request the ServletEngine created HttpServletRequest.
@param response the ServletEngine created HttpServletResponse.
@throws ServletException if an Exception is not handled by the
13
web application.
@throws IOException if there is an IO error during the request.
*/
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException
{
doPost(request, response);
}
/**
Services all requests for the controllers. It expects a request
parameter, <code>service</code>, specifying the name of the
transaction that is to be executed.
*
@param request the ServletEngine created HttpServletRequest.
@param response the ServletEngine created HttpServletResponse.
@throws ServletException if an Exception is not handled by the
web application.
@throws IOException if there is an IO error during the request.
*/
public void doPost(HttpServletRequest request,
HttpServletResponse response)
 
Search WWH ::




Custom Search