First try spring hosted struts, The Applicationcontext.xml file for the example in the Spring application manual is placed in the Web-inf, and the Applicationcontext.xml file that you generated with eclipse is placed in the SRC root directory. When hosting, the Struts-config.xml file should be configured as follows:
<plug-in classname= "Org.springframework.web.struts.ContextLoaderPlugIn" >
<set-property property= "contextconfiglocation" value= "/web-inf/applicationcontext.xml"/>
</plug-in>
This is the example in the spring User manual, but the hosting is unsuccessful because the Applicationcontext.xml configuration file is placed in the SRC directory. Directly cut the Applicationcontext.xml file to Web-inf, the results managed successfully, but other programs can not find Applicationcontext.xml ... If you change the configuration/web-inf/applicationcontext.xml in the Struts-config file to/applicationcontext.xml, or not ... Depressed... Ask the friends in the group, no one answered ... Find relevant information on the Internet, also did not find ... Depressed to the extreme.
A careful look at the code, suddenly dawned. It's so stupid. Since can write/web-inf/applicationcontext.xml, not also can write/web-inf/classes/applicationcontext.xml. /web-inf/classes/is not the SRC compiled directory.
Pour ....