what is the control flow in servlet when we send a request?

Answer Posted / ravikiran

when we are requesting a particular resource in the
server,the comiled class will be loaded into the container
calls the no-arg constructor and init() then the container
will create request,response objects and pass it to the
corresponding doXXX() method based on the http method of the
form,allocates a thread and do the business logic and send
the response back to the client by sending the thread to a
connection pool and destroying the request and response objects

Is This Answer Correct ?    14 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we use the constructor, instead of init(), to initialize servlet?

859


How to create war file?

843


Why jsp is better than servlet?

772


Why session tracking is needed?

821


Difference between doget and dopost?

934


Explain servlet events?

786


Given the request path below, which are context path, servlet path and path info?

796


If some new data has entered the database, explain how can a servlet refresh automatically?

1035


Explain the servlet context.

845


How would you create deadlock on your servlet?

872


Why do we need a constructor in a servlet if we use the init method?

767


What are the advantages of Servlet over CGI?

891


What is the structure of the http response

953


How to notify an object in session when session is invalidated or timed-out?

867


How will you pass values from HTML page to the servlet?

828