You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Yellek <ye...@gmail.com> on 2009/05/28 16:19:09 UTC

Obtaining the value of struts.action.extension in a struts2 nterceptor

I have a need to obtain the value of struts.action.extension in an
interceptor. Browsing around the source code with a debugger isn't getting
me anywhere. Can anyone suggest a way to access the struts.xml constant
definitions in the context of an interceptor?
-- 
View this message in context: http://www.nabble.com/Obtaining-the-value-of-struts.action.extension-in-a-struts2-nterceptor-tp23762699p23762699.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: Obtaining the value of struts.action.extension in a struts2 nterceptor

Posted by Martin Gainty <mg...@hotmail.com>.
not to mention Inject has 2 specs to conform to

JSR299 spec

2 flavors of JSR300 spec
JSR300 - Guice
JSR300 - Spring (most widespread Injection implementation)

http://www.h-online.com/open/Google-SpringSource-Joint-Dependency-Injection-for-Java-proposal--/news/113393

?
Martin Gainty 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
 
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




> Date: Thu, 28 May 2009 10:26:57 -0400
> Subject: Re: Obtaining the value of struts.action.extension in a struts2 	nterceptor
> From: wesw@wantii.com
> To: user@struts.apache.org
> 
> I'd imagine that you can use @Inject
> 
> But, there is always the warning that using @Inject is not supported
> and we reserve the right to change the behavior later (as if we'd ever
> be able to change @Inject)
> 
> -Wes
> 
> On Thu, May 28, 2009 at 10:19 AM, Yellek <ye...@gmail.com> wrote:
> >
> > I have a need to obtain the value of struts.action.extension in an
> > interceptor. Browsing around the source code with a debugger isn't getting
> > me anywhere. Can anyone suggest a way to access the struts.xml constant
> > definitions in the context of an interceptor?
> > --
> > View this message in context: http://www.nabble.com/Obtaining-the-value-of-struts.action.extension-in-a-struts2-nterceptor-tp23762699p23762699.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
> >
> >
> 
> 
> 
> -- 
> Wes Wannemacher
> Author - Struts 2 In Practice
> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
> http://www.manning.com/wannemacher
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009

Re: Obtaining the value of struts.action.extension in a struts2 nterceptor

Posted by Wes Wannemacher <we...@wantii.com>.
I'd imagine that you can use @Inject

But, there is always the warning that using @Inject is not supported
and we reserve the right to change the behavior later (as if we'd ever
be able to change @Inject)

-Wes

On Thu, May 28, 2009 at 10:19 AM, Yellek <ye...@gmail.com> wrote:
>
> I have a need to obtain the value of struts.action.extension in an
> interceptor. Browsing around the source code with a debugger isn't getting
> me anywhere. Can anyone suggest a way to access the struts.xml constant
> definitions in the context of an interceptor?
> --
> View this message in context: http://www.nabble.com/Obtaining-the-value-of-struts.action.extension-in-a-struts2-nterceptor-tp23762699p23762699.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
>
>



-- 
Wes Wannemacher
Author - Struts 2 In Practice
Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more
http://www.manning.com/wannemacher

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


Re: Obtaining the value of struts.action.extension in a struts2 nterceptor

Posted by Yellek <ye...@gmail.com>.
Thanks! This works like a charm.


Musachy Barroso wrote:
> 
> add this to your interceptor
> 
> @Inject(StrutsConstants.STRUTS_ACTION_EXTENSION)
> public void setExtension(Strtin ext) {}
> 
> musachy
> -- 
> "Hey you! Would you help me to carry the stone?" Pink Floyd
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Obtaining-the-value-of-struts.action.extension-in-a-struts2-interceptor-tp23762699p23763082.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: Obtaining the value of struts.action.extension in a struts2 nterceptor

Posted by Musachy Barroso <mu...@gmail.com>.
add this to your interceptor

@Inject(StrutsConstants.STRUTS_ACTION_EXTENSION)
public void setExtension(Strtin ext) {}

musachy
-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

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