we r taking
<load-on-startup>0</load-on-startup>
<load-on-startup>1</load-on-startup> in deployment
descripter for loading servlets like serv1 N serv2? so 'll
it take serv1 or serv2

Answers were Sorted based on User's Feedback



we r taking <load-on-startup>0</load-on-startup> <load-on-startup>1</load-on..

Answer / om

It 'll take serv2, b'coz <load-on-startup>0</load-on-startup>
means no tag. so first it'll goes to serv2.
Normally the servlets 'll loaded after getting the request
from the client.
if the servlets has to execute before coming the request we
need to take<load-on-startup>1</load-on-startup>.

Is This Answer Correct ?    5 Yes 2 No

we r taking <load-on-startup>0</load-on-startup> <load-on-startup>1</load-on..

Answer / mahesh babu puppala

Servlets with lower values are loaded before servlets with higher values. So servlet with 0 load-on-startup value will load first and servlet with value 1 will load after that.

so servlet1 first loaded then servlet2 will be loaded.

Is This Answer Correct ?    3 Yes 2 No

Post New Answer

More Core Java Interview Questions

What is the benefit of inner / nested classes ?

0 Answers  


how can you catch multiple exceptions in java?

0 Answers   Cyient,


A person says that he compiled a java class successfully without even having a main method in it? Is it possible?

0 Answers  


what are the jsp tags with example?

1 Answers   Photon,


how to connect one jsp page to another jsp page????

6 Answers   IIT, Symphony,






what is difference between Action messages and Action errors?

3 Answers   Bio Imagene, TCS,


Write java code to print "Hello how are you" Thread1 should have "Hello" Thread2 should have "how are you" both the threads should start at the same time

4 Answers   Huawei,


What exactly is a .class file?

0 Answers  


List types of storage classes in java?

0 Answers   Cyient,


How are this() and super() used with constructors?

9 Answers  


What are controls and their different types in awt?

0 Answers  


What language is an assembler written in?

0 Answers  


Categories