Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


what is the purpose of load_on_startup entry in struts-
config.xml?

Answers were Sorted based on User's Feedback



what is the purpose of load_on_startup entry in struts- config.xml?..

Answer / srinivasa

If we use load on startup web container creates the objects
based on the proirity when there are mutliple servlets.We
use load on start up for giving the proirity.

Is This Answer Correct ?    12 Yes 2 No

what is the purpose of load_on_startup entry in struts- config.xml?..

Answer / priyanka bhattacharyya


If the struts configuration objects were to be created on
the first call from the user it will adversely affect
performance by delaying response for the first user.

By specifying load-on-startup = 1 we tell the servlet
container to call the init() method immediately on start up
of the servlet container.

Is This Answer Correct ?    12 Yes 5 No

what is the purpose of load_on_startup entry in struts- config.xml?..

Answer / srinu

If load_on_startup is not enabled in web.Xml then the
servlet crates the object that class and sevletConfig object
will be created after constructor will be executed after it
will go to life cycle methods in servlets.i.e means lot of
processing will be done when load-on-startup is not enabled.

If load_on_startup is enabled then that moment when
WEBAPPLICATION is deployed all lot of processing will be done.
Then immediately executes LIFECYCLE method in servlets

Problem: suppose our webapplication contain 10 servlets then
which servlet object will be created?

solution: for this problem If we use load on startup web
container creates the objects based on the proirity when
there are mutliple servlets.We use load_ on_ start up for
giving the proirity.

Note:1 is highest priorty
2 is next highest priorty
-1 ignores that value
EX:<load-on-startup>1</load-on-startup>

Is This Answer Correct ?    7 Yes 3 No

what is the purpose of load_on_startup entry in struts- config.xml?..

Answer / anjani kumar jha

load_on_startup only shows the priority of the class loading
when u start ur web server in any web apps.

1----hightest prioritty
<load-on-startup>1</load-on-startup>

Is This Answer Correct ?    4 Yes 2 No

what is the purpose of load_on_startup entry in struts- config.xml?..

Answer / sekhar babu

If we are using any of the custom tags related to struts
like <html:form> etc, then it compulsory we need the tag of
<load-on-startup> in web.xml then only we will get the
output of corresponding jsp on to the browse or else we will
get the some errors like ActionMapping cannot resolve...

Is This Answer Correct ?    4 Yes 2 No

what is the purpose of load_on_startup entry in struts- config.xml?..

Answer / sulaiman harith

When we need to get the servelt object initialized before
the request is sent by the user.Usually servlet object will
get initialized soonafter the client send a request.Servlet
init() will get called once, to get the servlet object.

Is This Answer Correct ?    1 Yes 1 No

what is the purpose of load_on_startup entry in struts- config.xml?..

Answer / jagadish

The load-on-startup element indicates that this
servlet should be loaded (instantiated and have
its init() called) on the startup of the web
application. The optional contents of these
element must be an integer indicating the order in
which the servlet should be loaded. If the value
is a negative integer, or the element is not
present, the container is free to load the servlet
whenever it chooses. If the value is a positive
integer or 0, the container must load and
initialize the servlet as the application is
deployed. The container must guarantee that
servlets marked with lower integers are loaded
before servlets marked with higher integers. The
container may choose the order of loading of
servlets with the same load-on-start-up value.

Is This Answer Correct ?    0 Yes 0 No

what is the purpose of load_on_startup entry in struts- config.xml?..

Answer / srinivasa

To create the servlet objects when the web application is
started.

In Case of Struts Action servlet object is created when the
application is started on proirity basis.We can specify
some integer value for this in such cases servlets will be
created on priority basis . Low value servlet will be
created fisrt...

Is This Answer Correct ?    0 Yes 3 No

Post New Answer



More Struts Interview Questions

What is the differences between struts1 and struts2?

0 Answers  


What is the use of jsonvalidation?

0 Answers  


What do you mean by inner class and anonymous class?

0 Answers  


What are the components of struts?

0 Answers  


What is the purpose of execute method of action class?

0 Answers  






What are the features of struts?

0 Answers  


What is the use of struts config xml file?

0 Answers  


What is the use of Struts.xml configuration file?

0 Answers  


Explain the necessity of empty tag?

0 Answers  


How can link tag’s action attribute be used?

0 Answers  


What is controller in struts ?

0 Answers  


What is the significance of logic tags in Struts?

0 Answers  






Categories