You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Tobias Bocanegra (JIRA)" <ji...@apache.org> on 2008/02/05 23:51:11 UTC

[jira] Closed: (SLING-218) TagHandlerPool reuses tags, so need to initialize attributes in sling IncludeTagHandler

     [ https://issues.apache.org/jira/browse/SLING-218?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Bocanegra closed SLING-218.
----------------------------------


thanks

> 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
>            Assignee: Felix Meschberger
>             Fix For: 2.0.0
>
>         Attachments: includetaghandler.r617505.patch
>
>
> 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.