类似的主题已经制作,但没有任何亮点。因此,这个标题会让人想起其他人。
我一直在尝试让 Tomcat 运行,结果成功了,但它肯定不会向我显示任何内容。我尝试进入时收到 404。
Catalina 日志提供以下输出:
SEVERE: Parse error in default web.xml
org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
[Loads of stuff like "at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1642)"]
23-Feb-2012 07:59:26 org.apache.catalina.startup.ContextConfig processDefaultWebConfig
SEVERE: Occurred at line 1210 column 1
23-Feb-2012 07:59:26 org.apache.catalina.startup.ContextConfig start
SEVERE: Marking this application unavailable due to previous error(s)
23-Feb-2012 07:59:26 org.apache.catalina.core.StandardContext start
SEVERE: Error getConfigured
23-Feb-2012 07:59:26 org.apache.catalina.core.StandardContext start
SEVERE: Context [/skat] startup failed due to previous errors
23-Feb-2012 07:59:26 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
23-Feb-2012 07:59:26 org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8443
23-Feb-2012 07:59:26 org.apache.catalina.startup.Catalina start
INFO: Server startup in 509 ms
此外,我不会粘贴 1200 行,但我的默认 web.xml 如下所示: http://pastebin.com/mXSy6TPK
本来应该有1209行,但是贴的时候不小心去掉了一个换行空间。 正如您在错误消息中看到的,错误发生在根本不存在的行。 有什么想法吗?
最佳答案
您没有关闭根元素。除非您知道自己在做什么,否则不要篡改默认的 web.xml。
关于xml - Tomcat 启动(默认 web.xml)问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9415440/