Antoni asks:
> someone kwon where I can get an example of Multithread Servlet?
All servlets are multithreaded by default. For each request that
comes in via HTTP, the servlet engine starts a new thread and the new
thread invokes the servlet.
This raises concerns about making any complex servlet code
thread-safe, which means that if you have any persistent information
that the servlet changes, you need to make sure it can't be changed by
two threads, started by two different servlet invocations, at the same
time. Most of the nuances of multithreading for servlets are the same
as for any java program, and are covered by the usual discussions of
multithreading.
The servlet API has special built-in support for servlet
sesssions that you can use to help manage persistent information. You
get the session object by invoking HttpServletRequst.getSession().
Look in the usual sources (the servlet spec, the Sun servlet tutorial
which somebody else in this thread posted a link to, the purple-tech
servlet faq likewise, or your handy dandy _Java Servlet Programming_
by Jason Hunter, etc).
Steven J. Owens
[EMAIL PROTECTED]
[EMAIL PROTECTED]
___________________________________________________________________________
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