When Tomcat deploys a MAVEN WEB project, the associated DAO project is not deployed to E:\apache-tomcat-6.0.41\webapps\vehicleserv\WEB-INF\classes ( That is, there is no XML file in the DAO project, which causes the Tomcat startup times not to find a configuration file in the DAO project (such as <import resource= "Classpath:applicationcontext-dao.xml"/>
<import resource= "Classpath:applicationcontext-datasource.xml"/> the startup times cannot find the two corresponding files)
Solve:
1. Package The DAO Project: Right-click-->run-->maven clean-->maven instal on the DAO Project. Then add the dependency of this DAO project in the Pom.xml of the Web project
On a 2.web project, right-click the-->biuldpath-->configur biuldpath-->project tab in the corresponding DAO file, and open the DAO folder tree structure-double-tap the first item- The Edit Access Rule dialog box appears, and the forbidden option in resolution is changed to fill in the DAO project name in Accessible,rule Pattern--click OK.
Tomcat Project classes XML file without DAO project