<Host name="localhost" appBase=""
unpackWARs="true" autoDeploy="true">
<Context path="" docBase="/usr/local/tomcat/webapps/en" reloadable="true" debug="0" privileged="true"></Context>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
</Engine>
</Service>
unpackWARs="true" autoDeploy="true">
<Context path="" docBase="/usr/local/tomcat/webapps/en" reloadable="true" debug="0" privileged="true"></Context>
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t "%r" %s %b" />
</Host>
</Engine>
</Service>
</Server>
把appBase设置为空即可!注意:<Context docBase=“/usr/local/tomcat/webapps/en” ... docBase一定要完整路径
去除了appBase="webapps"中的webapps变成了appBase="",因为web应用程序都是放在webapps这个目录下的,如果 不把“webapps“去掉,这里会调用一次任务,在接下来的“<Context path”中又会调用一次任务,所以就重复了2次