If you are using struts extend the BaseAction instead of action. This will give you access to a getUserManager() and getUnitManager() methods that fetch services from the WebApplicationContext which is a much better way of doing things.