• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
pratapsiva sivakumar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3914
9
Chrome Fedora Hibernate
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
pankaj vijay
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic