[
https://issues.apache.org/struts/browse/WW-2366?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bob Tiernay reassigned WW-2366:
-------------------------------
Assignee: Tom Schneider
> UIBean and "#attr.theme" conflicts with el scoped variables w/ same name
> ------------------------------------------------------------------------
>
> Key: WW-2366
> URL: https://issues.apache.org/struts/browse/WW-2366
> Project: Struts 2
> Issue Type: Bug
> Affects Versions: 2.0.11
> Reporter: Bob Tiernay
> Assignee: Tom Schneider
>
> In org.apache.struts2.components.UIBean the following lines:
> 573 // If theme set is not explicitly given,
> 574 // try to find attribute which states the theme set to use
> 575 if ((theme == null) || (theme.equals(""))) {
> 576 theme = (String) stack.findValue("#attr.theme");
> 577 }
> Cause problems if the following jsp snippet exists above a UIBean extended
> tag in the current page:
> <s:set name="theme" value="theme" scope="page" />
> This causes a class cast exception if the type of the page scoped variable is
> not a string.
> The proposed fix would be either:
> 1. Perform an instanceof check to ensure that the value is a string (better)
> 2. avoid #attr.theme altogether and use another entry in the value stack
> (best)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.