aspose file tools*
The moose likes Servlets and the fly likes Loading two servlets at the startup? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Loading two servlets at the startup?" Watch "Loading two servlets at the startup?" New topic
Author

Loading two servlets at the startup?

Jignesh Gohel
Ranch Hand

Joined: Dec 28, 2004
Posts: 276
Hi this is my web.xml.

I wan to load the servlet at startup so i used
<load-on-startup/> like this.Its working .





Now if i have to servlets which are to be loaded at the startup then what to do and what is the difference between <load-on-startup/> and <load-on-startup>1</load-on-startup>??
[ July 17, 2006: Message edited by: Bear Bibeault ]

Regards,
Jignesh

The Art Of Life Is To Know When To Be Useless And When To Be Useful - CHUANG TZU
Ola Daniel
Ranch Hand

Joined: Jul 27, 2005
Posts: 105

Now if i have to servlets which are to be loaded at the startup then what to do and what is the difference between <load-on-startup/> and <load-on-startup>1</load-on-startup>??


The load-on-startup value tells the your container the order in which to load your servlets. Servlets marked with lower integers are loaded before servlets marked with higher integers.

When you use <load-on-startup/>, your container may choose the order of loading the servlets.


SCJP 1.4, SCWCD 1.4
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler et al, Refactoring: Improving the Design of Existing Code, 1999
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Loading two servlets at the startup?