Handling Multiple Threads in a JSP
Even though Java is a fairly thread-friendly language, many Java developers are not comfortable dealing with a threaded application. If you are developing Java Server Pages for a production system, you need to become comfortable with threading. By default, the JSP engine assumes that your Java Server Pages are thread-safe and might invoke the same page from multiple threads.
If all your Java code is enclosed within the <% %> tags and you don't use any external objects, your code is probably already safe. Remember, because each Java thread has its own execution stack (where local variables are stored), any method that only uses local variables should already be thread-safe. If you do use external variables, or ...
Get Special Edition Using Java™ 2 Enterprise Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.