struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@researchtogether.com
Subject Re: Redirect Action and wildcard methods
Date Sun, 18 Oct 2009 08:13:41 GMT
Thanks for the reply, it does work as it should, but I made a silly mistake :(
Nothing like wasting a day!

Jake

On Sat, Oct 17, 2009 at 04:23:05PM -0700, Tommy Pham wrote:
> 
> 
> 
> ________________________________
> From: "jake@researchtogether.com" <jake@researchtogether.com>
> To: user@struts.apache.org
> Sent: Sat, October 17, 2009 10:12:45 AM
> Subject: Redirect Action and wildcard methods
> 
> Hi,
> 
> I have the following actions set up:
> 
>        <action name="post*" class="com.mypack.PostAction" method="{1}">
>              <result name="category">/WEB-INF/jsp/pages/PostCategory.jsp</result>
>              <result name="topic">/WEB-INF/jsp/pages/PostTopic.jsp</result>
>              <result name="display" type="redirectAction">displayCategory</result>
>        </action>
>       
>        <action name="display*" class="com.mypack.DisplayAction" method="{1}">
>              <result name="category">/WEB-INF/jsp/pages/DisplayCategory.jsp</result>
>              <result name="topic">/WEB-INF/jsp/pages/Topic.jsp</result>
>        </action>
> 
> In my post action I return "display" which should redirect to the action "displayCategory"
which, by the way I have the display action set up should call the "Category" method in the
DisplayAction class, but it doesn't. It calls the execute method.
> 
> Tommy>>  I remember correctly from my reading, you need to return "category". 
Have you gone through the bootstrap guide/tutorial?
> 
> I have tried setting up the redirectAction up in a coupld of ways, firstly as show above,
but also using
> <param name="actioniName">display</param>
> <param name="method">Category</param>
> using this method I get a java.lang.NoSuchMethodException: com.mypack.DisplayAction.!Category()
the method *does* exist as I can browse to displayCategory and the behaviour is correct -
is the .! part of the problem here?
> 
> and also <param name="actionName">displayCategory</param> does the same as
the more complete action detailed above.
> 
> Can anyone provide any insight as to why it isn't working as I expect?
> 
> Cheers,
> Jake aka _LisWork
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message