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 are the different session tracking techniques?

670


How can you start a jta transaction from a servlet deployed on jboss?

670


What are the ways to handle multi-threading in servlets?

590


How do you configure a centralized error handler in servlets?

530


Explain url encoding in servlet?

573






Describe in brief RequestDespatcher?

590


What methodology can be followed to store more number of objects in a remote server?

1812


what is the different between a servlet and a cgi? Why do you go for servlet rather than cgi?

568


Which interface must be implemented by all servlets?

789


What is the servletconfig object?

523


Why the container loads server at the application startup and how?

576


What is the purpose of dispatcherservlet properties?

506


What are the various ways of session supervision in servlets?

514


Define the lifecycle for executing a jsp page.

588


Can we override destroy method in servlet?

495