Am I the only one that thinks this sounds backwards? Doesn't isThreadSafe="true" sound like single threaded? from the spec: 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.
Hi Max, How do we synchonize the instance variable i.e anything which we put it in a jsp:declaration <%!String s="rishi";%> and the value of isThreadsafe attribute is default (true)
posted 18 years ago
Best way, I think, is to make the JSP thread safe. Perhaps you could declare a method that would be synchronized that accesses the instance variable and declare the instance variable as private. Anybody else know the asnwer to this? Max
I was her plaything! And so was this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!