File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Diiference between <welcome-file-list> tag and <load-on-startup> tag in web.xml file of servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Diiference between <welcome-file-list> tag and <load-on-startup> tag in web.xml file of servlet" Watch "Diiference between <welcome-file-list> tag and <load-on-startup> tag in web.xml file of servlet" New topic
Author

Diiference between <welcome-file-list> tag and <load-on-startup> tag in web.xml file of servlet

pratapsiva sivakumar
Greenhorn

Joined: Nov 10, 2008
Posts: 18
Sir,
I want to know the diiference between <welcome-file-list> tag and <load-on-startup> tag in web.xml file of servlet?
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3849

pratapsiva sivakumar wrote:I want to know the diiference between <welcome-file-list> tag and <load-on-startup> tag in web.xml file of servlet?

Welcome file list is the place you can define the files to be served when the user doesn't request a particular URL pattern but trying to access a particular directory inside the web app so container can serve a file inside that directory defined under the welcome files. "<load-on-startup>" (with a value larger than 0) inside the "<servlet>" tag tells the container to load and have the servlet instance ready at the server startup rather than loading and instantiating it at the first client request.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
pankaj vijay
Ranch Hand

Joined: Apr 01, 2008
Posts: 75
servlet initialisation happen when first client request comes. so first client have to suffer. If you will write <load-on-startup> with greater than 0 then this servelt will be initialized on server startup. But dont be confuse that what will happn i will write 1 ,2 ,3 Or 4 ..because all means same. the main thing is it should be greater then 0
But if you have 4 servlet & using value 1,2,3,4 for differenet servlet then these will loaded on the basis of these values


Pankaj Vijay (SCJP, SCBCD)
Learn Core Java,Learn Servlet Jsp, SCJP Questions,Struts Tutorial
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Diiference between <welcome-file-list> tag and <load-on-startup> tag in web.xml file of servlet