• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

let me get this straight....

 
Jimmy Blakely
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Am I correct in concluding that...

When a HttpServlet receives a request, the object's service(ServletRequest request, ServletResponse response) method is called (inherited from GenericServlet) and that method in turn calls the object's service(HttpServletRequest request, HttpServletResponse response) method.
In essence, the method would look like this...
public void service(ServletRequest request, ServletResponse response) throws IOException, ServletException
{
service((HttpServletRequest)request, (HttpServletRespose)response); // object casting
}
Am I on the right track?
 
Rishi Singh
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi jimmey,
yeah u r on the right track...whenever a request is made the service method of the Generic Servelet class is called , then if its a HttpServlet the service method has to be overridden by HttpServlet's service( public/protected)which in turn calls either the doGet/doPost as per the mode of request.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic