Stripes

variable evaluation in tag attribute with UseActionBeanTagExtraInfo

Details

Description

Consider the following snippet from a given jsp file:

<c:set var="binding">MyAction.action</c:set>
...
<stripes:useActionBean binding="/stuff/${binding}" var="actionBean" />

I am simply binding an action bean to /stuff/MyAction.action

During jsp compilation, the stripes:useActionBean tag is validated through UseActionBeanTagExtraInfo

Unfortunately, this results in a ClassCastException because of the following statement in the validation in class UseActionBeanTagExtraInfo:
String var = tag.getAttributeString("var");

Indeed, debug shows, for some reason that I haven't investigated, that the value of the "binding" attribute is an object, and I cannot get any more information about it. Looks like the ${binding} variable hasn't been properly evaluated yet. And it cannot be cast to a String.

Note that:
1. the problem is solved by not using a variable: <stripes:useActionBean binding="/stuff/MyAction.action" var="actionBean" />
2. I had no problem with stripes 1.4.3 (which did not feature the UseActionBeanTagExtraInfo)

Regards,

chafrilo

Activity

Hide
Frederic Daoud added a comment - 26/Sep/09 9:24 PM

This is related to STS-514 (but is a different bug).

Show
Frederic Daoud added a comment - 26/Sep/09 9:24 PM This is related to STS-514 (but is a different bug).
Hide
Frederic Daoud added a comment - 26/Sep/09 9:41 PM

Fixed in revision 1151.

Show
Frederic Daoud added a comment - 26/Sep/09 9:41 PM Fixed in revision 1151.

People

Vote (0)
Watch (0)

Dates

  • Created:
    26/Aug/08 9:39 AM
    Updated:
    04/Jan/11 1:27 PM
    Resolved:
    27/Oct/09 1:56 PM