Create subclass of
struts ActionServlet that supports "classpath:" config file paths.
We use Spring throughout the web app, and we define beans in several different
spring XML files.. the web app loads spring from these files using a Web app
startup listener provided by Spring called
org.springframework.web.context.ContextLoaderListener (you can find source code
online)....
This listener allows us to define the config files as being located "somewhere
on the classpath" by prepending "classpath:" to the file name. So, in web.xml,
we also have this:
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext-service.xml,
classpath:applicationContext-punchout.xml,
classpath:search-dao.xml,
classpath:database.xml</param-value>
</context-param>
This way, the config files don't have to be packaged with the WAR, instead they
are packed in the JARs that contain the actual classes referenced in the config
files...
We want to do the act same thing, but with the struts-config.xml file.