You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Bartley, Chris P" <cb...@sprintspectrum.com> on 2002/06/14 00:20:11 UTC

Problems dynamically specifying forward attribute in tag

My apologies if the answer to this is ridiculously obvious, but I'm having
problems dynamically specifying the "forward" attribute in the <bean:struts>
tag.

Something like this works just fine:

   <bean:struts id="targetActionForward" forward="forward.home" />

However, this does not:

   <% String crap = "forward.home"; %>
   <bean:struts id="targetActionForward" forward="<%= crap %>" />

It fails with the following stack trace:

2002-06-13 17:09:29 - Ctx(/ptt) : compile error: req=R( /ptt +
/jsp/html/common/main/body/sublistTab
le/filterByLetter.jsp + null) - java.lang.ClassCastException:
java.lang.Object
        at javax.servlet.jsp.tagext.TagData.getAttributeString(TagData.java)
        at
org.apache.struts.taglib.bean.StrutsTei.getVariableInfo(StrutsTei.java:90)
        at javax.servlet.jsp.tagext.TagInfo.getVariableInfo(TagInfo.java)
        [snip]

I'm using Tomcat 3.3.1 on Win2k sp1.

What the heck am I doing wrong?

thanks heaps,

chris

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>