Ahamd,
you may implement DI the pullway:
the following code, from org.springframework.web.struts.ActionSupport, shows how to access the WebApplicationContext from a struts Action / Plugin:
Code:
/**
* Fetch ContextLoaderPlugIn's WebApplicationContext from the ServletContext,
* falling back to the root WebApplicationContext (the usual case).
* @param actionServlet the associated ActionServlet
* @return the WebApplicationContext
* @throws IllegalStateException if no WebApplicationContext could be found
* @see DelegatingActionUtils#findRequiredWebApplicationContext
*/
protected WebApplicationContext initWebApplicationContext(ActionServlet actionServlet)
throws IllegalStateException {
return DelegatingActionUtils.findRequiredWebApplicationContext(actionServlet, null);
}
HTH.