"Thread safe" means it is safe for more than one thread to access the JSP at a time. So I can't imagine why you would expect an exception to occur if more than one thread accesses the JSP at the same time. Basically, your assumption doesn't make any sense.
Joined: Sep 30, 2008
isThreadSafe attribute -- this support the facility of maintaining thread for sending multiple and concurrent requests from the JSP container to the JSP page if you specify the true value of the attribute otherwise if you specify the false value of the attribute then the JSP container can send only one request at one time.
Joined: Sep 11, 2006
So I am guessing is.. how is the page ThreadSafe? does the isThreadSafe method make the PAGE threadsafe?
I mean.. how can I see the utility of this directive?
Of course, just saying that a class is thread safe doesn't make it thread safe. However, if you declare that your JSP is not thread safe, then the container will believe you and not let two threads use it at the same time. And if you declare that it is thread safe, then the container will allow more than one thread to use it at the same time. In this case, bad things may happen if it is really not thread safe.
However, writing JSP code which is not thread safe is a bad practice anyway, so there should be no point in ever using this attribute. The question is purely theoretical.