Answer Posted / ravikiran(aptech mumbai)
1).container will find the web.xml
2).container parses the web.xml
3).creates the instance of servlet using
class.forname(classname).newInstance()
4).preinitializes the servlet with the entry known as
<load-on-startup>
5).Initializing the servlet instance using
init(ServletConfig config) method
6).Container creates request and resonse objects and finds
that the requested resource is a servlet and invokes a new
thread for the particular request
7).Calls doGet() or doPost() inaccordance with the method
decared inside html
8).And passes the request and response objects into the
doGet() or doPost()
9).And with the help of response object the response is ent
back to the client
10).destroy() method call will cleanup the resources
11).the thread will go into a pool
12).The request and response objects will be sent to an
output stream
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
Explain how to improve Servlet Performance?
What is string tokenizer?
I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>
In the servlets, we are having a web page that is invoking servlets ,username and password? which is checks in database? Suppose the second page also if we want to verify
How does Cookies work in Servlets?
Explain the role of dispatcherservlet and contextloaderlistener.
What are the advantages of cookies?
What is servlet mapping?
When should you prefer to use doget() over dopost()?
What are some disadvantages of storing session state in cookies?
Which http method is said to be non-idempotent and idempotent?
If a servlet is not properly initialized, what exception may be thrown?
When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?
What is the importance of init() method in Servlet ?
What is the major difference between context parameter and context attribute?