Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / dipak.cvrca

-->first request comes from client browser to server
(container)which takes the control to the web.xml file.

-->in xml file servlet file(.class) will be searched
according to the information about the url pattern given
in the address,then coresponding class file is loaded to
the container(loading) by the method
java.lang.class.forName().newInstance.

-->now container call the init(servletConfig) method to add
necessary headers in the servlet,such as Config,context
session,request and many more.

-->now control pass to the service()of the HttpServlet(if
you have extended this class) and the type of method
(get/post) is checked and accordingly the control will
pass to the implemented doGet() or doPost() of the your
class(by the dynamic method dispatch)

-->after service the container will call the destroy() of
Servlet class.
i hope this answer will satishfy you,thank
you,(Dipak ku. jenamani)

Is This Answer Correct ?    95 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we invoke another servlet in a different application?

1207


How do you deal property files in servlet?

1057


How do you invoke a servelt?

1120


When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?

1095


How to get ip address in jsp login page and how to validate like 127.1.0.1 all should not be greater than 255

3389


What is the default http method in the servlet?

1290


Why is httpservlet declared abstract?

1114


What are important features of Servlet 3?

1086


What is servlet container. how it works?

1134


Who is responsible for writing a constructor?

1259


What do you mean by interservlet communication?

1064


What is the workflow of a servlet?

1172


Which interface should be implemented by all servlets?

1214


How we can get ip address of client in servlet?

987


When a servlet accepts a call from a client, it receives two objects. What are they?

1237