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
Is Constructor possible in abstract class in java ?
What is the difference between compiler and jvm?
What is the size of string?
Write a java program to count the number of words present in a string?
Which one of the following suits the description of a string better: derived or primitive?
What is bubble sort in java?
enlist some features of jdk.
How do I enable java in safari?
Which collection is thread safe in java?
What are the procedures?
What are the types of java?
What are byte codes?
How do you create a null object?
How many unicode characters are there?
Does A Class Inherit The Constructors Of Its Superclass?