use "@Inject". @Inject("custom.myConstant") public void setSomeString(String mystring) {...}
Things to note about that: 1. Struts needs to be the one creating your actions (no object factory from an IoC, like Spring, Guice, etc) 2. This is not guaranteed to work in the future, but it is unlikely to change anytime soon. musachy On Mon, Nov 24, 2008 at 5:37 AM, Manish Kumar Wadhwa <[EMAIL PROTECTED] > wrote: > Hi All, > > Is there a away to get the value of a constant, declared in the struts.xml > file, in my action class? > > <constant name="custom.myConstant" value="true" /> > > Thanks, > Manish > > > ------------------------------------------------------------------------------------------------------------- > > DISCLAIMER > This email and any files transmitted with it are confidential and are > solely for the use of the individual or entity to which it is addressed. Any > use, distribution, copying or disclosure by any other person is strictly > prohibited. If you receive this transmission in error, please notify the > sender by reply email and then destroy the message. Opinions, conclusions > and other information in this message that do not relate to official > business of the company shall be understood to be neither given nor endorsed > by NIIT Ltd. Any information contained in this email, when addressed to > Clients is subject to the terms and conditions in governing client contract. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd