What is the best approach to set servlet context variable in Struts? This variable is displayed on every single page in header tile and has to be loaded from DB. For that purpose there is Hibernate DAO and Spring Service which returns the requested value.
My current approach was to extend Struts PlugIn class and inject my service into it. This is not possible to do directly in Struts but I found a page (http://opensource.atlassian.com/confluence/spring/display/DISC/Spring-enabling+Struts+PlugIns) where Ulrik Sandberg creates a proxy which allows such functionality. This is working when I deploy my application but JUnits are failing somewhere in servletunit.struts.MockStrutsTestCase.getActionServlet(MockStrutsTestCase.java:331) on java.lang.NullPointerException.
Is there another approach which I can take which is not going to involve debugging someone others classes?