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 do you mean by ordered and sorted in collections in java?
What are constructors in java?
Explain why wait(), notify() and notifyall() methods are in object class rather than in thread class?
What is quick sort in java?
Are static members inherited to sub classes?
Can inner class extend any class?
what is the difference between future and callable interface in java?
Why is core java important?
What is operator overloading. Is it is supported in java?
I want to print “hello” even before main is executed. How will you acheive that?
How to Sort Strings which are given in List and display in ascending order without using java api.
Which methods are used during serialization and deserialization process?
Can we able to pass objects as an arguments in java?
Can we define a package statement after the import statement in java?
What is the difference between state-based unit testing and interaction-based unit testing?