How to create servlet object during server startup time?

How to create servlet object during server startup time?

Postby Kishan » Fri Feb 08, 2013 3:45 pm

How to create servlet object during server startup time?
Kishan
 
Posts: 191
Joined: Tue Jan 29, 2013 4:21 am

Re: How to create servlet object during server startup time?

Postby Padma41 » Mon Feb 11, 2013 6:24 pm

BY declaring <load-on-startup> to that servlet in web.xml file
Padma41
 
Posts: 6
Joined: Wed Jan 30, 2013 6:23 pm

Re: How to create servlet object during server startup time?

Postby Kishan » Mon Feb 18, 2013 5:01 am

You can specify load on start up option either in the web.xml or in the servlet annotation.

@WebServlet(loadOnStartup=1)
Kishan
 
Posts: 191
Joined: Tue Jan 29, 2013 4:21 am


Return to Servlets

Who is online

Users browsing this forum: No registered users and 1 guest

cron