This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt in load on startup tag

 
anil kumar
Ranch Hand
Posts: 447
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I defined <load-on-startup> tag in the web.xml like this


<servlet>
-----
--------
<load-on-startup></load-on-startup>
</servlet>

I thought that when i wll deploy the project,i will get give error but it is not and working properly.And the init method is getting called at the time of deploy time.


Why is it not giving error?

Thanks

Anil Kumar
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your web.xml is erroneous because you have not specified the value for
the <load-on-startup> sub element of the <servlet> element.

I use Netbeans, my web.xml looks erroneous when I applied <load-on-startup>
without value to it.


Thanks,
 
anil kumar
Ranch Hand
Posts: 447
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

Even i have used the same but my application is deployed sucessfully,even by web.xml is erroneous


That means even if we specified like <load-on-startup></load-on-startup>
The value is not compulsary.

Ok if we think like this.But why the container is creating object of that servlet at deploy time

In specification also i did not find about this.They said about negative,positive,0 and what happens if it is not there.That's it.

Thanks

Anil Kumar
[ July 14, 2007: Message edited by: anil kumar ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic