You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by RogerV <ro...@googlemail.com> on 2009/10/02 11:41:33 UTC

Convention Plugin: How to specify a redirect action

Could someone tell me the correct format for the @Result annotation for a
redirect action. The action class I want to redirect to is called
ProcessTemplate and I've tried

@Action(results={@Result(name="success", type="redirect-action",
location="process-template")})
	public String execute() throws Exception {
		return SUCCESS;
	}

@Action(results={@Result(name="success", type="redirect-action",
location="processtemplate")})
@Action(results={@Result(name="success", type="redirect-action",
location="ProcessTemplate")})

and the app fails to start with
The Result type [redirect-action] which is defined in the Result annotation
on the class [class com.vasilikon.actions.CreateTemplate] or determined by
the file extension or is the default result type for the PackageConfig of
the action, could not be found as a result-type defined for the Struts/XWork
package [com.blackbox.actions#convention-default#] - [unknown location]

If I remove the annotation and deploy the app, config-browser finds the
action as process-template

Regards

-- 
View this message in context: http://www.nabble.com/Convention-Plugin%3A-How-to-specify-a-redirect-action-tp25713026p25713026.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Convention Plugin: How to specify a redirect action

Posted by Paweł Wielgus <po...@gmail.com>.
Hi Roger,
try redirectAction.

Best greetings,
Paweł Wielgus.


2009/10/2 RogerV <ro...@googlemail.com>:
>
> Could someone tell me the correct format for the @Result annotation for a
> redirect action. The action class I want to redirect to is called
> ProcessTemplate and I've tried
>
> @Action(results={@Result(name="success", type="redirect-action",
> location="process-template")})
>        public String execute() throws Exception {
>                return SUCCESS;
>        }
>
> @Action(results={@Result(name="success", type="redirect-action",
> location="processtemplate")})
> @Action(results={@Result(name="success", type="redirect-action",
> location="ProcessTemplate")})
>
> and the app fails to start with
> The Result type [redirect-action] which is defined in the Result annotation
> on the class [class com.vasilikon.actions.CreateTemplate] or determined by
> the file extension or is the default result type for the PackageConfig of
> the action, could not be found as a result-type defined for the Struts/XWork
> package [com.blackbox.actions#convention-default#] - [unknown location]
>
> If I remove the annotation and deploy the app, config-browser finds the
> action as process-template
>
> Regards
>
> --
> View this message in context: http://www.nabble.com/Convention-Plugin%3A-How-to-specify-a-redirect-action-tp25713026p25713026.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> 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