Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

[s2] How to pass param to actions from Struts.xml

Harring Figueiredo

2007-03-14

Replies:

Folks,

Is there a way to pass parameter to an Action using the struts.xml config
file.

1 ) I see that the <action ..> has a param attribute. How can I access its
value from within the action?

My action already implements the ParameterAwre interface. However, I am
unable to see the value on the Map provided by the setParameter() IoC call.

2) Is this the same functionality as the the Struts ActionMapping?

Thanks in advance

Harring Figueiredo
©2008 junlu.com - Jax Systems, LLC, U.S.A.