Hi,

Was looking at the the JSP spec (also posted in the mailing list some time back): 

"All properties of a tag handler instance exposed as attributes will be initialized by 
the container using the appropriate setter methods before the instance can be used to 
perform the action methods. It is the responsibility of the JSP container to invoke 
the appropriate setter methods to initialize these properties. It is the 
responsability of user code, be it scriptlets, JavaBeans code, or code inside custom 
tags, to not invoke these setter methods, as doing otherwise would interfere with the 
container knowledge. 
...
Once properly set, all properties are expected to be persistent, so that if the JSP 
container ascertains that a property has already been set on a given tag handler 
instance, it needs not set it again. User code can access property information and 
access and modify tag handler internal state starting with the first action method 
(doStartTag) up until the last action method (doEndTag or doFinally for tag handlers 
implementing TryCatchFinally)."

(1) Doesn't this go against the way 'nested' library is designed? At the very least, 
shouldn't the tags cache a snapshot of property values at the beginning of 
doStartTag() and restore at the end of doEndTag()?

(2) When is the release() method supposed to be called? Not very clear from the spec. 
Will the instance be reused after doEndTag() or after release() has been called?

(3) When the spec refers to the properties being 'persistent', would i be correct in 
assuming that container does not need to set it, only when the existing value is the 
same as one it would be set to, OR does it mean that once set the property values are 
final?

regards,
Mohan.

 



---------------------------------
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day

Reply via email to