when a servlet sends request for first time it uses the
follwing methods
a)init
b)doget()
c)dopost()
d)service
Answer Posted / shaik baji
1)We can load the servlet class in two ways as follows:
a) We can load the servlet class while deploying our
applicaion on the server by using the "<load-on-startup>"
tag in web.xml
Ex: <load-on-startup>any positive integer </load-on-startup>
b) We can load the servlet class when the first request
came to it by the container.
2)Once the class is loaded the container will create the
instance of the servlet and initilize it with the
ServletConfig object by invoking "init(ServletConfig scObj)"
3)Then the container create a thread for the request and
execute the setvice() method.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
What are the types of arrays in java?
What is cr keyboard?
What is comparator in java?
Does java vector allow null?
From the two, which would be easier to write: synchronization code for ten threads or two threads?
What is Java Shutdown Hook?
What is the core java?
How does a cookie work in Servlets?
Explain about serializable interface in java?
What are the different types of data structures in java?
Do you need to import math in java?
Why is java logo a cup of coffee?
Can you override private or static method in java?
Can anonymous class have constructor?
What are the supported platforms by java programming language?