I need to access the struts.action.extension value in the struts.xml file from an interceptor. Any suggestions?
views:
128answers:
1
A:
Thanks to Musachy Barroso over on the Struts User list I added the following to my interceptor:
/**
* @param strutsActionExtension the strutsActionExtension to set
*/
@Inject(StrutsConstants.STRUTS_ACTION_EXTENSION) //Note this isn't necessarily supported
public void setStrutsActionExtension(String strutsActionExtension) {
this.strutsActionExtension = strutsActionExtension;
}
as Wes Wannemacher notes on the same list this in't actually supported but is extremely unlikely to change in future releases.
Peter Kelley
2009-05-28 14:40:33