The Artima Developer Community
Sponsored Link

Legacy Design Forum
Thread Safety



This page contains an archived post to the Design Forum (formerly called the Flexible Java Forum) made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Thread safety in JSP

Posted by medha on November 08, 2000 at 3:37 AM


What is the optimum way to achieve thread safety in JSP? If I define the variables in Declaration tag, they become the bottlneck. Can I avoid using declaration tag? My application is such that the JSP gets a reference of the bean and has to generate HTML showing the data in the bean.Only for the first time the JSP is invoked, the bean will not be available. So I am using declaration tag to declare variables which will store data like whether the bean is available or not. This data will be used across the entire page. If I don't do this way, then at every stage where I want to read the property of the bean, I need to first check whether the bean is available or not. This may slow down the performance.
Has someone already solved this problem? Kindly reply ASAP.
Thanking in anticipation...


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us