关于tomcat弹错问题

 

今天无意中修改了一下tomcat,不知修改了什么,搞到tomcat直接罢工了。

忽然间就启动不了了,看着都快急死了。

不停的报Could not load the Tomcat server configuration

大概就是说不能读取tomcat的配置文件,这时我就去检查一下server文件夹下的一些xml文件,结果发现

在context.xml文件里有问题

 

<?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>
<Context reloadable="true">
<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>

<!-- 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" />
-->
<Resource name="jdbc/ebook" auth="Container"
type
="javax.sql.DataSource"
driverClassName
="com.mysql.jdbc.Driver"
url
="jdbc:mysql://localhost:3306/ebook"
username
="root"
password
="root"
maxActive
="400"
maxIdle
="50"
maxWait
="-1"/>
</Context>

 

在这里,我看到了我设置了两个<context>,其中一个是多余的,没有闭合,所以就直接报错,我只需要把其中一个去掉就行啦,嘿嘿,搞定了~~

posted @ 2012-03-06 08:02  死靈天使  阅读(414)  评论(0编辑  收藏  举报