严重: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myapp]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> com/Chuli01 in servlet mapping
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3217)
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3192)
at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1305)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1354)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more十月 17, 2012 8:45:01 上午 org.apache.catalina.startup.HostConfig deployDirectory
严重: Error deploying web application directory E:\Program Files\apache-tomcat-7.0.30\webapps\myapp
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myapp]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
——————————————————————————————————————————————————————
所有文件都在webapps/myapp文件夹里,分别是:
index.jsp
pingnian.jsp
runnian.jsp
error.jsp
WEB-INF/classes/com/Chuli01.class
WEB-INF/web.xml
——————————————————————————————————————————————————————
以下是web.xml的内容
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
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.
--><web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0"
metadata-complete="true">
<servlet>
<description>
Welcome to Tomcat
</description>
<servlet-name>Chuli01</servlet-name>
<servlet-class>com.Chuli01</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Chuli01</servlet-name>
<url-pattern>com/Chuli01</url-pattern>
</servlet-mapping>
</web-app>
——————————————————————————————————————————————————————
然后启动tomcat就出现上面的报错。应该是我的WEB.XML路径问题,可是我检查了,没有错误字母,并且已经让大小写敏感!已经头大了,请各位老鸟帮忙,谢谢啦!
org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myapp]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> com/Chuli01 in servlet mapping
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3217)
at org.apache.catalina.core.StandardContext.addServletMapping(StandardContext.java:3192)
at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1305)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1354)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
... 11 more十月 17, 2012 8:45:01 上午 org.apache.catalina.startup.HostConfig deployDirectory
严重: Error deploying web application directory E:\Program Files\apache-tomcat-7.0.30\webapps\myapp
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/myapp]]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:904)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
——————————————————————————————————————————————————————
所有文件都在webapps/myapp文件夹里,分别是:
index.jsp
pingnian.jsp
runnian.jsp
error.jsp
WEB-INF/classes/com/Chuli01.class
WEB-INF/web.xml
——————————————————————————————————————————————————————
以下是web.xml的内容
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
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.
--><web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0"
metadata-complete="true">
<servlet>
<description>
Welcome to Tomcat
</description>
<servlet-name>Chuli01</servlet-name>
<servlet-class>com.Chuli01</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Chuli01</servlet-name>
<url-pattern>com/Chuli01</url-pattern>
</servlet-mapping>
</web-app>
——————————————————————————————————————————————————————
然后启动tomcat就出现上面的报错。应该是我的WEB.XML路径问题,可是我检查了,没有错误字母,并且已经让大小写敏感!已经头大了,请各位老鸟帮忙,谢谢啦!
解决方案 »
- apache2.2.14 ,Tomcat6.0.18 整合 JK问题
- 瞧瞧这题目!你懂的!
- 使用replaceAll 替换中文出现乱码!
- 我是用webwork开发的,不明白报的错什么意思!找不到原因 麻烦帮我看看!
- 给各位兄弟姐妹拜年了,大家新的一年万事如意阿。新年偶送出偶得第一个问题。关于IE7文件下载。
- [求助] 在jsp中实现能够浏览本地目录的对话框
- 请问一下在JAVA中如何判断用户输入是字符还是数字??
- 怎么用JavaScript自写一个函数显示隐藏层?
- 怎样把一个session变量的全部值读出来!请各位高手帮助一下!
- 在页面中给出提示信息的问题(大家帮帮忙!急)
- 求一段js代码实现,另外还有分相送。
- root、root给它整郁闷死了......求解!
Caused by: java.lang.IllegalArgumentException: Invalid <url-pattern> com/Chuli01 in servlet mapping
所以显然不是“应该是我的WEB.XML路径问题”就是这个写错误了:
<url-pattern>com/Chuli01</url-pattern>改成:
<url-pattern>/com/Chuli01</url-pattern>