"C. Jason Benedict" wrote:
Are tag libs automatically synchronized under the covers? 
 Or is a new taglib created for each user session?  -- C. Jason Benedict


New tag class *instances* are used for each tag used on a page, and a particular tag instance can assume it is being used by only a single request processing thread, until the release() method is called.  That is why you can safely use instance variables to store the property values.

The JSP spec says it is legal for the container to recycle tag instances that have the same pattern of properties set, but Tomcat doesn't really do this at the moment.  The full lifecycle of tag instances, and what you can expect in terms of the sequence of method calls, is spelled out in the JSP specification <http://java.sun.com/products/jsp/download.html>.

Craig
 

Reply via email to