工作的時(shí)候接受老項(xiàng)目藍(lán)凌v13,在使用eclipse 的tomcat 啟動(dòng) ssh 項(xiàng)目的時(shí)候,啟動(dòng)遇到相關(guān)錯(cuò)誤:
java.lang.NoSuchMethodException: org.apache.catalina.deploy.WebXml addFilter
反手百度,大部分是 答案是在tomcat/conf/context.xml 加上一句配置,
<Loader delegate="true"/>
整個(gè)配置是
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--><!-- The contents of this file will be loaded for each web application --><Context>
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<Loader delegate="true"/>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
<!-- Uncomment this to enable Comet connection tacking (provides events
on session expiration as well as webapp lifecycle) -->
<!--
<Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
-->
</Context>
加入之后項(xiàng)目正常運(yùn)行,但是如果關(guān)閉tomcat 之后的話,該文件會(huì)恢復(fù)默認(rèn)值,重啟啟動(dòng)需要繼續(xù)添加這一段話,不知道為啥。