Spring MVC官方例子的一个错误(step by step) Mr

报错内容:

F:\springProject\springapp\build.xml:85: taskdef class org.apache.catalina.ant.I
nstallTask cannot be found

错误原因:

在tomcat以后的版本中,InstallTask类被替换为DeployTask所以直接替换类即可。

Class InstallTask is deprecated & replaced by DeployTask, so later version catalina-ant.jar (tomcat set up) doesn't have class InstallTask. It's just the case of replacing InstallTask by DeployTask to see it working again. For example, following entry in build.xml in spring mvc tutorial 
<taskdef name="install" classname="org.apache.catalina.ant.InstallTask"> 
<classpath refid="catalina-ant-classpath"/> 
</taskdef> 

should be replaced as 

<taskdef name="install" classname="org.apache.catalina.ant.DeployTask"> 
<classpath refid="catalina-ant-classpath"/> 
</taskdef>

出处:http://www.coderanch.com/t/108375/tools/Failed-build-InstallTask-cannot-found

Mr-sniper
北京市海淀区
邮箱:rafx_z@hotmail.com
原文地址:https://www.cnblogs.com/rafx/p/Spirng20121024.html