最后才发现原因是Tomcat的server.xml配置文件有问题:apache-tomcat-7.0.67conf的service.xml下边多了类似与
<Host appBase="webapps" autoDeploy="true" name="localhost" unpackWARs="true">
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="%h %l %u %t "%r" %s %b" prefix="localhost_access_log." suffix=".txt"/>
<Context docBase="MyProject" path="/MyProject" reloadable="true" source="org.eclipse.jst.jee.server:MyProject"/></Host>
的代码,把<Host></Host>这一段,注释就好了。