how this statement works..?
public void service(HttpServletRequest
request,HttpServletResponse response)
Answer Posted / shubha
1.servlet container calls the service(servletreq,
servlrtResp) method of HTTPServlet.
2.the service(ServletReq, ServletResp) method of
HTTPServlet calls the service(HttpServletReq,
HttpServletResp) method of the same class. in this service
method is overloaded in the HttpServlet class.
3.service(HttpServletReq, HttpServletResp) mthos alayse the
request and findout which HTTP method is being
used.Depending on Http method appropriate doXXX() mthod
will be call.
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
What is context in servlet?
Explains the differences between context.getrequestdispatcher() and request.getrequestdispatcher()?
What is the difference between CGI and Servlet?
What are the drawbacks of cgi?
How can we implement a jsp page?
How to find whether a parameter exists in the request object?
Explain the methods of request dispatcher in servlet?
What is the difference between the servlets and cgi programs?
Can we refresh servlet in client and server side automatically?
What is the difference between sendredirect() and forward() in a servlet?
What is servletconfig?
What is lazy loading and what is Generic Servlet Class?
Define the servlet mapping.
Why is it that we can't give relative URL's when using ServletContext.getRequestDispatcher() when we can use the same while calling ServletRequest.getRequestDispatcher()?
What’s the difference between forward() and sendredirect() methods?