Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is struts2 framework?

889


What is the need of struts?

928


What are the reasons for an error message not being displayed while developing struts application?

902


Is struts compatible with other java technologies?

916


What’s the difference between struts and turbine? What’s the difference between struts and espresso?

944


What is the configuration files used in struts?

912


Can you explain value stack?

870


How action-mapping tag is used for request forwarding in struts configuration file?

916


What is spring and struts in java?

927


How to convert struts to spring mvc?

942


How do u provide security to ur project?(Banking domain project)

4842


Difference between struts and spring? Or why use spring, if you are already using struts?

917


What is the difference between Jakarta Struts and Apache Struts? Which one is better to use?

986


What is the purpose of @beforeresult?

967


What is the purpose of @createifnull annotation annotation?

997