can you please elaborate what do you mean MAKE JSP SINGLE THREADED ?
OCPJP 6(100 %) OCEWCD 6(91 %)
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35220
7
posted
0
A much better question would be: how can I make my JSP/servlet/Web app multithread safe? Web apps are inherently multi-threaded, and you should learn to write code that is, too.
However there are a huge number of reasons why you should NOT go down this path.
I think the best answer to this is to refer to the spec description of this property:
isThreadSafe Note: The Servlet 2.4 specification deprecates SingleThreadModel, which is the most common mechanism for JSP containers to implement isThreadSafe.
Page authors are advised against using isThreadSafe, as the generated Servlet may contain deprecated code.
Indicates the level of thread safety implemented in the page. If false then the JSP container shall dispatch multiple outstanding client requests, one at a time, in the order they were received, to the page implementation for processing.
If true then the JSP container may choose to dispatch multiple outstanding client requests to the page simultaneously.
Page authors using true must ensure that they properly synchronize access to the shared state of the page. Default is true.
Note that even if the isThreadSafe attribute is false the JSP page author must ensure that accesses to any shared objects are properly synchronized., The objects may be shared in either the ServletContext or the HttpSession.