How do I implement synchronization in JSP if I don't want to use SingleThreadModel interface?

Raghu Hemmige

The easiest way of making JSP pages thread safe is to ensure that the server side variables in your JSP page are defined within the jsp-service method, when it is translated into a servlet. This is possible if you define variablese within <% %>. Make sure that you dont use <%! %> , as this is used for defining class level variables of the servlet, which will obviously not be thread safe.

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact