Answer Posted / shakir khan
javax.servlet.Servlet interface defines 3 methods known as
life cycle.
Servlet intialisation takesplace every first time,it
receives a request and remains in memory till times out or
server shutdown
When first request came in for a servlet,servlet invoke
init() only once.
public void init(ServletConfig config)
{
}
Thereafter if any user wants requet,it will directly
executes the service().
public void service(ServletRequest req,ServletResponse res)
throws servletException,IOException
{
}
When server wants to remove the servlet from pool ,it will
executes the destroy().
public void destroy()
{
}
| Is This Answer Correct ? | 14 Yes | 2 No |
Post New Answer View All Answers
What mechanisms are used by a Servlet Container to maintain session information?
What is called servlet mapping?
What is dispatcher servlet?
What is the use of servlet wrapper classes?
Which java framework is most popular?
How do you load an image in a Servlet?
What is ServletConfig object?
What is cgi and what are its drawbacks?
what do you understand by url rewriting?
What are the types of servlets? Explain
Explain web container.
What is the functionality of actionservlet and requestprocessor?
How can we perform any action at the time of deploying the project?
What is the major difference between context parameter and context attribute?
Write a program to show the functionality of servlets.