tag:blogger.com,1999:blog-8712770457197348465.post6013780209711198156..comments2024-03-28T02:47:19.159-07:00Comments on Javarevisited: What is load-on-startup servlet element in web.xml with Example?javin paulhttp://www.blogger.com/profile/15028902221295732276noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-8712770457197348465.post-79945476466023204202018-08-08T06:40:44.327-07:002018-08-08T06:40:44.327-07:00Hello @Unknown, yes, you can pass any number, no m...Hello @Unknown, yes, you can pass any number, no max value. javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-47950530416789682822018-08-01T10:29:21.468-07:002018-08-01T10:29:21.468-07:00There is no max value we can pass any numberThere is no max value we can pass any numberAnonymoushttps://www.blogger.com/profile/10758268855727210262noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-76789334657413818052017-11-24T09:03:05.321-08:002017-11-24T09:03:05.321-08:00what is the max value we can pass to this tagwhat is the max value we can pass to this tagRajeshhttps://www.blogger.com/profile/15066439001673844997noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-4508349077495488602015-07-15T07:10:17.772-07:002015-07-15T07:10:17.772-07:00@Anonymous, Yes, you are right.
1) Container will...@Anonymous, Yes, you are right.<br /><br />1) Container will intialize the servlet and call its init() method if load-on-statup is 0 or a positive integer greater than zero, when application is deployed or when servlet container is started and application is already deployed.<br /><br />2) load-on-startup is actually eager loading and can also used to define relative ordering e.g. servlets with javin paulhttps://www.blogger.com/profile/15028902221295732276noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-77276056580142468832015-07-14T07:30:39.495-07:002015-07-14T07:30:39.495-07:00Hi Javin,
You have mentioned that if its value is ...Hi Javin,<br />You have mentioned that if its value is greater than 0 then only in start up it will be initialized. I think its greater than and equal to 0. Please confirm.<br /><br />Thanks,<br />Sukhi.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-53787016559933827152014-06-18T21:12:14.083-07:002014-06-18T21:12:14.083-07:00Diyyana Kishore Babu:-
Hi Javin, one small add on...Diyyana Kishore Babu:-<br /><br />Hi Javin, one small add on point to ‘’. When web container started and while running, it loads the deployed web application, during this web container creates the servlet context object based on the information provided in web.xml file. Once this provided for the particular servlet class it give the priority order to this sequence defined servlet classes to loadDiyyana Kishore Babuhttps://www.blogger.com/profile/15440151849499937415noreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-90297688450715190682011-12-29T18:15:35.098-08:002011-12-29T18:15:35.098-08:00It looks like blogger ate < tag , anyway I don&...It looks like blogger ate < tag , anyway I don't think you can put Servlet element inside another servlet element, you got to check web.xml DTD which says what can go inside servlet tag. but most probably answer is no.Javin @ Servelt Interview Questionshttp://javarevisited.blogspot.com/2011/09/servlet-interview-questions-answers.htmlnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-43677066524836831442011-12-20T01:58:18.484-08:002011-12-20T01:58:18.484-08:00A good example of load on startup is spring's ...A good example of load on startup is spring's dispatcher servlet which is always specified with load-on-startup tag value:<br /> dispatcher org.springframework.web.servlet.DispatcherServlet 2 </servletRakeshnoreply@blogger.comtag:blogger.com,1999:blog-8712770457197348465.post-64199856308809171052011-12-16T22:12:14.623-08:002011-12-16T22:12:14.623-08:00very useful and detailed explanation.very useful and detailed explanation.விஜய்கரன் பாhttps://www.blogger.com/profile/11224087008737466361noreply@blogger.com