*
The moose likes Servlets and the fly likes state of servlet object when server starts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "state of servlet object when server starts" Watch "state of servlet object when server starts" New topic
Author

state of servlet object when server starts

sitaram irrinki
Ranch Hand

Joined: Feb 16, 2005
Posts: 158
what is the state of the servlet obj when web server is started
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

It may or may not exist.

If you specify load-on-startup in the servlet declaration in web.xml, you can force it to load when the context loads. Otherwise, it may not be loaded until the first time someone tries to access it.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: state of servlet object when server starts
 
Similar Threads
Strange EJB Behaviour
Stateless vs. Stateful Session Beans?
Web-State Pattern
A Question in void Jspdestroy method
When the client makes its second call to the stateful session bean, how does that bean know it is co