O'Reilly logo

Special Edition Using Java™ 2 Enterprise Edition by Mark Wutka

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required