[
https://issues.apache.org/struts/browse/WW-1773?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_40353
]
Mads Riise Rasmussen commented on WW-1773:
------------------------------------------
That is true ... I missed that. But then it seems that I can't use Interceptor
Annotations without xml-configuration. I guess this annotation (zero)
configuration in Struts 2 still has some things to be worked out. Thanks for
the response - I will change the status now that it isn't a bug.
> Annotation @Before doesn't seem to work in Struts 2.0.6 GA release
> ------------------------------------------------------------------
>
> Key: WW-1773
> URL: https://issues.apache.org/struts/browse/WW-1773
> Project: Struts 2
> Issue Type: Bug
> Components: Actions, Configuration
> Affects Versions: 2.0.6
> Reporter: Mads Riise Rasmussen
>
> I have a pretty simple case with an action configured using annotation, but
> @Before doesn't work.
> I can see "# UserTestAction execute()" in the log but not "# UserTestAction
> doBefore()".
> My action class is as follows:
> import org.apache.log4j.Logger;
> import org.apache.struts2.config.Result;
> import com.opensymphony.xwork2.interceptor.annotations.Before;
> @Result(name="success", value="/user/user_edit.jsp")
> public class UserTestAction extends UserBaseAction {
> private static final Logger log =
> Logger.getLogger(UserTestAction.class);
>
> private static final long serialVersionUID = -5967061439632906203L;
>
> @Before
> public void doBefore() throws Exception {
> log.debug("# UserTestAction doBefore()");
> prepare();
> }
>
> public String execute() throws Exception {
> log.debug("# UserTestAction execute()");
> return SUCCESS;
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.