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 is the full form of jpeg?
What is mnemonic code?
What is a class object?
What is the difference between the final method and abstract method?
Can we declare an interface as final?
What is string value?
What is the use of parseint in java?
Why javac is not recognized?
What sorting algorithm does javascript use?
What are access specifiers available in java?
Can one thread block the other thread?
Write a code to show a static variable?
What is the use of arraylist class in java?
What happens if we don’t define serial version uid?
Why should we use singleton pattern instead of static class?