أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
A Java Server pages can be indicated as threadsafe through the isThreadSafe page directive attribute. Setting a value of false, will get the container to synchronize access to page level objects (and not to session and application scoped objects or objects of any other variety). Sometimes, it is still the responsibility of the developer to ensure that synchronous access to thread unsafe regions of code.
Evermore, the SingleThreadModel interface has also been deprecated in the Servlet Specification release 2.4. The SingleThreadModel interface is used to implement the supposed thread safety in JSPs as well - generated servlet classes will implement the SingleThreadModel for JSPs that use the threadsafe attribute. The specification itself outlines why the interface is deprecated.
By implementing the following directive in the JSP page
<% "page isThreadSafe="false @%>