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


Please Help Members By Posting Answers For Below Questions

What are the two important api's in for servlets?

590


How to generate the server side programming and the advantages of it over the other languages?

562


What is a servlet?

608


What is called a session?

621


Difference between java beans & servlets?

588






What is the major difference between context parameter and context attribute?

595


Which java framework is most popular?

581


hi actully i hav form columns with origin and destination names .as like as i need to create one more column with name amount. my requirement is when i select origin and destination columns automatically i need to get amount from database.how can i. please tel me with relative code

2282


How can we perform any action at the time of deploying the project?

622


What is preinitialization of a servlet?

582


Differentiate between get and post?

684


How can you push data from an Applet to a Servlet?

607


What is servlet looping or chaining?

658


What are the mechanisms used by a servlet container for maintaining session information?

566


What is http servlet?

584