tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phil Shaw" <>
Subject Thread safety for RequestDispatcher
Date Wed, 08 Dec 2004 12:58:59 GMT
I'm looking at design options for a servlet that uses forwarding. If 
I were to get a RequestDispatcher in the init method (from 
ServletContext) and store it as a static field, it would save getting 
a RequestDispatcher for every request object.

That may minimise unnecessary repetition, but I wonder if it is safe 
to have multiple request threads forwarded via the same 
RequestDispatcher instance?

Previous mailings say that forwarding should be handled by the same 
thread as the request. I couldn't find any guidance here or on the 
Web about multiple threads accessing the same RequestDispatcher.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message