2 u010740591 u010740591 于 2015.07.18 11:37 提问

tomcat能运行,但写在webapps里的项目运行状态为false

除了tomcat-users改过,其他都没再改过了。之前是可以运行的,用的是jdk1.8.0.45,后来把jdk升到1.8.0.51,就不能访问。怀疑是jdk版本的问题,又把jdk将为原来版本,结果还是不能访问,把tomcat重新装了一遍也不行。打开tomcat的manager看了一下,自己在webapps下建的项目运行状态为false! 图片说明图片说明

catalina日志:

七月 18, 2015 11:28:04 上午 org.apache.catalina.startup.ContextConfig parseWebXml
严重: Parse error in application web.xml file at jndi:/localhost/webDemo/WEB-INF/web.xml
org.xml.sax.SAXParseException; systemId: jndi:/localhost/webDemo/WEB-INF/web.xml; lineNumber: 11; columnNumber: 3; 元素类型 "context-param" 必须由匹配的结束标记 "" 终止。
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:177)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:441)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:368)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1436)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1749)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2973)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1213)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:649)
at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1555)
at org.apache.catalina.startup.ContextConfig.parseWebXml(ContextConfig.java:1843)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1263)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:889)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:386)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5416)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1322)
at org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:694)
at org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:217)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:213)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2476)
at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2465)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)

七月 18, 2015 11:28:04 上午 org.apache.catalina.startup.ContextConfig parseWebXml
严重: Occurred at line 11 column 3
七月 18, 2015 11:28:04 上午 org.apache.catalina.startup.ContextConfig configureStart
严重: Marking this application unavailable due to previous error(s)
七月 18, 2015 11:28:04 上午 org.apache.catalina.startup.TldConfig execute
信息: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
七月 18, 2015 11:28:04 上午 org.apache.catalina.core.StandardContext startInternal
严重: One or more components marked the context as not correctly configured
七月 18, 2015 11:28:04 上午 org.apache.catalina.core.StandardContext startInternal
严重: Context [/webDemo] startup failed due to previous errors

求问怎么解决

6个回答

Evankaka
Evankaka   Ds   Rxr 2015.07.18 11:39
已采纳

Parse error in application web.xml file at jndi:/localhost/webDemo/WEB-INF/web.xm
说是你的web.xml有错误啊

u010740591
u010740591 哦,我看看,新手菜鸟,见笑了
2 年多之前 回复
yuke198907
yuke198907   2015.07.18 12:22

web.xml配置的不对啊,错误很明显吧

u010740591
u010740591 是的,在学习李刚老师的轻量级j2ee,他建议新手全手写,最好不用IDE,结果中招了。。。。谢谢各位了
2 年多之前 回复
wangcunhuazi
wangcunhuazi   2015.07.18 12:32

错误在web.xml,看这句提示就知道了:
严重: Parse error in application web.xml file at jndi:/localhost/webDemo/WEB-INF/web.xml
org.xml.sax.SAXParseException; systemId: jndi:/localhost/webDemo/WEB-INF/web.xml; lineNumber: 11; columnNumber: 3; 元素类型 "context-param" 必须由匹配的结束标记 "" 终止。

应该是你的context-param没有写终止标签。

u010443481
u010443481   2015.07.18 16:40

同意楼上的看法,错误日志已经很明显的告诉你错误在哪里了。
org.xml.sax.SAXParseException; systemId: jndi:/localhost/webDemo/WEB-INF/web.xml; lineNumber: 11; columnNumber: 3; 元素类型 "context-param" 必须由匹配的结束标记 "" 终止。

CSDNXIAOD
CSDNXIAOD   2015.07.19 15:07

怎么tomcat上运行playframework的项目
----------------------biu~biu~biu~~~在下问答机器人小D,这是我依靠自己的聪明才智给出的答案,如果不正确,你来咬我啊!

leieiteppei
leieiteppei   2015.07.19 15:11

web.xml
元素类型 "context-param" 必须由匹配的结束标记 "" 终止。

Csdn user default icon
上传中...
上传图片
插入图片