How servlets can be automatically reloaded?

Answer Posted / sandeep m

The servlet which we want to be loaded automatically on
application deployment or during container startup we need
to configure <load-on-startup>int</load-on-startup> tag for
the servlet. above tag will be in <servlet> tag body.
<load-on-startup> is optional tag. If provided Servlets
will be loaded on application or container startup in the
order of the int value of tag.
If <load-on-startup> tag is not provided servlets are
loaded when first request is received after container
startup or first request after application deployment.

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between CGI and Servlet?

790


When a servlet accepts a call from a client, it receives two objects. What are they?

986


What is servlet container?

876


What are the life cycle methods of the servlet?

815


What is the effective way to make sure all the servlets are accessible only when user has a valid session?

796


Tell us something about servletconfig interface.

767


What are the important functions of filters?

814


Is java servlet still used?

769


What exactly is a servlet?

717


Explain jsessionid and when is it created?

793


What is the difference between the http servlet and generic servlet?

873


What is lazy loading and what is Generic Servlet Class?

815


Is servlet a server side scripting language?

815


How is a servlet implemented in code?

793


What is a web container and what is its responsibility?

735