Matthew Seaborn wrote:
What I meant was if the following is defined in the struts.xml

            <constant name="struts.url.includeParams" value="none" />

How does that make it to the URLTag#setIncludeParams method and how can make 
our own constants?


Didn't I answer that?  Repeated below again.

---
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.url.includeParams")
public void setIncludeParams(String value) {}

You can create new constants as struts.xml.
---
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.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to