I think this is the preferred method of obtaining the Configuration object:
/**
* Struts: Inject the Struts Configuration for looking up the proper Action
*
* @param configuration The Struts Configuration
*/
@Inject
public void setConfiguration (Configuration configuration) {
this.configuration = configuration;
} //setConfiguration
(*Chris*)
On Thu, Apr 22, 2010 at 6:43 AM, Bhaarat Sharma <[email protected]> wrote:
> nevermind...got it:
>
> Dispatcher.getInstance().getConfigurationManager().getConfiguration().getRuntimeConfiguration();
>
> On Thu, Apr 22, 2010 at 9:41 AM, Bhaarat Sharma <[email protected]>
> wrote:
>
> > I was going through the API's and came across this method<
> http://www.jarvana.com/jarvana/view/org/apache/struts/struts2-core/2.1.8/struts2-core-2.1.8-javadoc.jar!/com/opensymphony/xwork2/config/impl/DefaultConfiguration.html#getRuntimeConfiguration()<http://www.jarvana.com/jarvana/view/org/apache/struts/struts2-core/2.1.8/struts2-core-2.1.8-javadoc.jar%21/com/opensymphony/xwork2/config/impl/DefaultConfiguration.html#getRuntimeConfiguration%28%29>
> >
> >
> > It is getRuntimeConfiguration() in class DefaultConfiguration
> >
> > Does anyone know how I can access this method from my code??
> >
> > I know how to get hold of the configurationManager by doing:
> > Dispatcher.getInstance().getConfigurationManager()
> >
> > but how do we gain access to the runtimeconfiguration?
> >
>