Did you put the Interceptor in your interceptor stack to set up the components? It looks like this:
<interceptor name="component" class="com.opensymphony.xwork.interceptor.component.ComponentInterceptor "/> It initializes your Action with the components you've defined. Jason > -----Original Message----- > From: Erik Hatcher [mailto:[EMAIL PROTECTED] > Sent: Tuesday, July 01, 2003 10:33 PM > To: [EMAIL PROTECTED] > Subject: [OS-webwork] application scope > > > On Tuesday, July 1, 2003, at 04:52 PM, Jason Carreira wrote: > > Check out ServletActionContext.getServletContext(). This should let > > you do what you want to do (at the expense of not being able to use > > your Action outside a Servlet container, but you're used to > Struts, so > > we forgive you :-)) > > I have this in WEB-INF/classes/components.xml: > <components> > <component> > <scope>application</scope> > <class>org.example.antbook.webwork.AppConfig</class> > <enabler>org.example.antbook.webwork.AppConfigAware</enabler> > </component> > </components> > > I'm still working my way through the source code to see how > this stuff > works, but it'd be nice if something like this worked. It > didn't work > for me with my action class implementing AppConfigAware (like the > sample CounterAware) - the setter is never called. Help me out by > pointing me to places in the code where this config stuff is used and > accessed so I can learn it, thanks! > > This isn't something critical, I'm just converting my demo > app that has > some hacked state in application scope which really should be > refactored to another mechanism. I could implement > HttpServletRequestAware and enable the ServletConfigInterceptor, it > seems. I guess either what Jason said, or this, would work, but I'm > aiming for something more decoupled. > > In our production apps we do cache our code table lookups (states, > countries, etc) in applications scope, though, so we'd certainly need > to get at this easily in WW2 within JSP pages at least (but > not really > needed in actions, I don't think). > > Erik > > > > ------------------------------------------------------- > This SF.Net email sponsored by: Free pre-built ASP.NET sites > including Data Reports, E-commerce, Portals, and Forums are > available now. Download today and enter to win an XBOX or > Visual Studio .NET. > http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_06 1203_01/01 _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01 _______________________________________________ Opensymphony-webwork mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/opensymphony-webwork