what is the purpose of load_on_startup entry in struts-
config.xml?
Answer Posted / dinesh/bangalore/india
Details about load on startup (load-on-startup tag) in
Servlet:
Used to decide whether servlet will be " lazily " or "
eagerly " loaded
Specified in web.xml file
If the value is not specified or is a Number < 0 then it
means " lazy loading "
What " lazy loading " means is that servlet is NOT loaded
by container on startup
Servlet in this case is loaded on the first client request -
so the first client can experience poor performance
" Eager " loading means that the servlet is initialised on
container startup
If there are two servelts A & B with values 0 & 1 than it
means that Servlet A ( having value = 0 ) will be loaded
first
So if there are more than one servlet this element
specifies the order of loading - lower integer values (
including zero ) are loaded first
If you specify this element but do not provide the value -
even then the servlet will be the first servlet that gets
loaded
To ensure that servlet follows " lazy loading " - do not
provide this entry at all in web.xml file OR provide a
negative number.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is interceptor? And life cycle methods of interceptor?
Which interceptor is responsible for mapping request parameters to action class Java Bean properties?
What is actioninvocation in struts2?
Is struts efficient?
What do you know about validation plugin ?
What is the procedure of operation of a form tag?
What are inner class and anonymous class?
Explain the necessity of empty tag?
What is spring and struts in java?
what is meant by Struts Validator Framework?
Why we use struts over servlets?
How can we integrate log4j in Struts2 application?
What are best practices to follow while developing Struts2 application?
How do u provide security to ur project?(Banking domain project)
Are struts thread safe?