TagHandlerPool reuses tags, so need to initialize attributes in sling
IncludeTagHandler
---------------------------------------------------------------------------------------
Key: SLING-218
URL: https://issues.apache.org/jira/browse/SLING-218
Project: Sling
Issue Type: Bug
Reporter: Tobias Bocanegra
the TagHandlerPool reuses tag handlers. but the sling include tag handler is
not aware of that. the problem is that the
setters of the attributes are not called if not indicated in the jsp tag. eg:
<sling:include resource="<%= resource %>" />
<sling:include path="/foo/bar/>
would cause the 2nd include to use the same resource as the 1st one, since the
'setResource(null)' is not called.
in order to prevent this, i recommend either to drop the pool or fix the
include tag by initializing the variables in the setPageContext(PageContext).
another question: is this tag pool thread safe? from the look at the compiled
java code of the jsp, there is only 1 pool per user.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.