修改.settings目录下的org.eclipse.wst.common.component文件
<?xml version="1.0" encoding="UTF-8"?>
<project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="XXX">
<wb-resource deploy-path="/" source-path="/WebRoot" tag="defaultRootSource"/>
<property name="java-output-path" value="/XXX/WebRoot/WEB-INF/classes"/>
<property name="context-root" value=XXX"/>
</wb-module>
</project-modules>