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 preinitialization of a servlet?

588


What is dispatcher servlet?

561


How do servlets work?

538


How a servlet is unloaded?

591


What are session variable in servlets?

570






What is the directory structure of web application?

530


What are the phases of the servlet life cycle?

614


How will two or three servlets interact or communicate with each other?

916


What is the web server used for running the Servlets?

581


What is Client-Server Computing?

1899


Which are the different ways you can communicate between servlets?

532


What are different ways for servlet authentication?

569


Can we use the constructor, instead of init(), to initialize servlet?

586


Explain the war file?

612


Can a jsp be called using a servlet?

586