Re: Adding interceptors through annotations
Thanks for the idea, I'm going to try it now ;) 2008/6/16 Gamble, Wesley (WG10) <[EMAIL PROTECTED]>: > Dave is correct, you can configure your interceptors with XML and then > define @ParentPackage in your annotations to point to the name of your > Struts package. > > -Original Message- > From: Dave Newton [mailto:[EMAIL PROTECTED] > Sent: Sunday, June 15, 2008 1:23 PM > To: Struts Users Mailing List > Subject: Re: Adding interceptors through annotations > > You don't, but this functionality may have been added to S2.1 (don't > quote me on that; I'm woefully behind, but I know it has been > discussed.) > > One typical solution is to define a package's interceptors via XML then > use the @ParentPackage annotation to configure your actions. > > Dave > > --- On Sun, 6/15/08, Ramon <[EMAIL PROTECTED]> wrote: > > > From: Ramon <[EMAIL PROTECTED]> > > Subject: Re: Adding interceptors through annotations > > To: user@struts.apache.org > > Date: Sunday, June 15, 2008, 2:04 PM > > Uff I wrote it so badly, > > > > Summary: > > Does anyone know how to add interceptors to an Action > > defined with > > annotations (without definitiion in an xml file)??? > > > > > > > > 2008/6/15 Ramon <[EMAIL PROTECTED]>: > > > > > Hi, > > > > > > I'm starting with a little project to test new > > features in struts2. I'm > > > trying both ways (xml configuration and annotations) > > but I don't know how to > > > define interceptors for an action which is defined > > with interceptors. for a > > > example my action looks like this: > > > > > > > > > @Results({ > > > @Result(value="/jsp/menu.jsp" )}) > > > public class MenuAction{ > > > > > > public String execute() throws Exception { > > > return "success"; > > > } > > > } > > > > > > Know, I thoigut it would be an annotation to define > > interceptors for this > > > Action, but I haven't found anything. Does anyone > > know how to do it??? > > > > > > Have Fun ;) > > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
RE: Adding interceptors through annotations
Dave is correct, you can configure your interceptors with XML and then define @ParentPackage in your annotations to point to the name of your Struts package. -Original Message- From: Dave Newton [mailto:[EMAIL PROTECTED] Sent: Sunday, June 15, 2008 1:23 PM To: Struts Users Mailing List Subject: Re: Adding interceptors through annotations You don't, but this functionality may have been added to S2.1 (don't quote me on that; I'm woefully behind, but I know it has been discussed.) One typical solution is to define a package's interceptors via XML then use the @ParentPackage annotation to configure your actions. Dave --- On Sun, 6/15/08, Ramon <[EMAIL PROTECTED]> wrote: > From: Ramon <[EMAIL PROTECTED]> > Subject: Re: Adding interceptors through annotations > To: user@struts.apache.org > Date: Sunday, June 15, 2008, 2:04 PM > Uff I wrote it so badly, > > Summary: > Does anyone know how to add interceptors to an Action > defined with > annotations (without definitiion in an xml file)??? > > > > 2008/6/15 Ramon <[EMAIL PROTECTED]>: > > > Hi, > > > > I'm starting with a little project to test new > features in struts2. I'm > > trying both ways (xml configuration and annotations) > but I don't know how to > > define interceptors for an action which is defined > with interceptors. for a > > example my action looks like this: > > > > > > @Results({ > > @Result(value="/jsp/menu.jsp" )}) > > public class MenuAction{ > > > > public String execute() throws Exception { > > return "success"; > > } > > } > > > > Know, I thoigut it would be an annotation to define > interceptors for this > > Action, but I haven't found anything. Does anyone > know how to do it??? > > > > Have Fun ;) > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding interceptors through annotations
You don't, but this functionality may have been added to S2.1 (don't quote me on that; I'm woefully behind, but I know it has been discussed.) One typical solution is to define a package's interceptors via XML then use the @ParentPackage annotation to configure your actions. Dave --- On Sun, 6/15/08, Ramon <[EMAIL PROTECTED]> wrote: > From: Ramon <[EMAIL PROTECTED]> > Subject: Re: Adding interceptors through annotations > To: user@struts.apache.org > Date: Sunday, June 15, 2008, 2:04 PM > Uff I wrote it so badly, > > Summary: > Does anyone know how to add interceptors to an Action > defined with > annotations (without definitiion in an xml file)??? > > > > 2008/6/15 Ramon <[EMAIL PROTECTED]>: > > > Hi, > > > > I'm starting with a little project to test new > features in struts2. I'm > > trying both ways (xml configuration and annotations) > but I don't know how to > > define interceptors for an action which is defined > with interceptors. for a > > example my action looks like this: > > > > > > @Results({ > > @Result(value="/jsp/menu.jsp" )}) > > public class MenuAction{ > > > > public String execute() throws Exception { > > return "success"; > > } > > } > > > > Know, I thoigut it would be an annotation to define > interceptors for this > > Action, but I haven't found anything. Does anyone > know how to do it??? > > > > Have Fun ;) > > - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Adding interceptors through annotations
Uff I wrote it so badly, Summary: Does anyone know how to add interceptors to an Action defined with annotations (without definitiion in an xml file)??? 2008/6/15 Ramon <[EMAIL PROTECTED]>: > Hi, > > I'm starting with a little project to test new features in struts2. I'm > trying both ways (xml configuration and annotations) but I don't know how to > define interceptors for an action which is defined with interceptors. for a > example my action looks like this: > > > @Results({ > @Result(value="/jsp/menu.jsp" )}) > public class MenuAction{ > > public String execute() throws Exception { > return "success"; > } > } > > Know, I thoigut it would be an annotation to define interceptors for this > Action, but I haven't found anything. Does anyone know how to do it??? > > Have Fun ;) >