What's the easiest way for me to get a bean onto "Web Application scope" - I think ServletContextScope in Spring - so that I can reference it globally via direct JSTL EL like ${lookupMap} ?
What's the easiest way for me to get a bean onto "Web Application scope" - I think ServletContextScope in Spring - so that I can reference it globally via direct JSTL EL like ${lookupMap} ?
I think you can do something like:
Code:servletContext.setAttribute("lookupMap", lookupMapInstance);
RJ Salicco
www.axiomaticit.com
Yes, but there's no natural place in my application for such code to reside. It would be much more natural to specify that scope in the bean configuration or web.xml.
Otherwise I have to subclass ContextLoaderListener or inject these beans into some other web-aware bean which wouldn't naturally be the "owner" of such data.
Right. Sorry for the misunderstanding. Maybe org.springframework.web.context.support.ServletCon textAttributeExporter will work for you?
RJ Salicco
www.axiomaticit.com
That, indeed, does what I need. Thank you!