>
> Are servlets designed to share memory between invocations, or does the web
> server allocate a seperate instance for each request?
Servlets are designed to share memory.
> Is it poor design to try to allocate data shared by many invocations; i.e.
> keeping a shared data object inside the servlet which different requestors can
> add data (like session tracking)?
Not at all, but when you're operating in a distributed environment you are better
of to store the shared data as attribute in the ServletContext, cause there you
can be sure that you have only one instance. Only the not yet final Servlet API
2.2 says that in not distributed env. there should be only a single instance.
> Or is this a poor serlvet programming style?
Not at all, but be carefull - you might have to synchronize some stuff, because of
concurrent modifications.
Cheers,
-hendrik
- - - - - - - - - - - - - - - - - - - - - - - - - - -
tagtraum industries http://www.tagtraum.com/
jo! small&smart 2.1 servletengine
Java Server & Servlets The German servlet book
The WebApp Framework http://www.webapp.de/
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html