This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.
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