views:

128

answers:

1

I need to access the struts.action.extension value in the struts.xml file from an interceptor. Any suggestions?

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