If you want the value of a constant, use @Inject on a setter. This is
available only to objects instantiated by the Struts2 Container (actions
or beans in the config)
Example:
import com.opensymphony.xwork2.inject.Inject;
@Inject("struts.devMode")
public void setDeveloperMode(String value) {}
---
To access them elsewhere you'll have to get a reference to the
com.opensymphony.xwork2.inject.Container instance which may be available
from your DI framework (Guice/Spring). I'm not sure how much luck you'll
have with that.
---
If you just want a list of the standard Struts2 constants, see
StrutsConstants.class
Hope that helps,
Jeromy Evans
Matthew Seaborn wrote:
How can you get hold of the constants defined in the struts.xml?
Matthew Seaborn
Software Architect
t +44(0) 208 484 0729
m +44(0) 7949 465 142
e [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]>
Sussex House
Plane Tree Crescent
Feltham, Middlesex, TW13 7HE
United Kingdom
http://www.performgroup.com/
________________________________________________________________________
CONFIDENTIALITY - This email and any files transmitted with it, are
confidential, may be legally privileged and are intended solely for
the use of the individual or entity to whom they are addressed. If
this has come to you in error, you must not copy, distribute, disclose
or use any of the information it contains. Please notify the sender
immediately and delete them from your system.
SECURITY - Please be aware that communication by email, by its very
nature, is not 100% secure and by communicating with Perform Group by
email you consent to us monitoring and reading any such correspondence.
VIRUSES - Although this email message has been scanned for the
presence of computer viruses, the sender accepts no liability for any
damage sustained as a result of a computer virus and it is the
recipient’s responsibility to ensure that email is virus free.
AUTHORITY - Any views or opinions expressed in this email are solely
those of the sender and do not necessarily represent those of Perform
Group.
COPYRIGHT - Copyright of this email and any attachments belongs to
Perform Group, Companies House Registration number 6324278.
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG.
Version: 7.5.519 / Virus Database: 269.22.1/1345 - Release Date: 26/03/2008 6:50 PM
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]