xml - Tomcat 启动(默认 web.xml)问题

标签 xml tomcat webserver boot

类似的主题已经制作,但没有任何亮点。因此,这个标题会让人想起其他人。

我一直在尝试让 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/

相关文章:

java - 安装为 Windows 服务时使用远程调试 (jdwp) 启动 Tomcat

performance - 减缓网站爬虫

tomcat - 应用服务器监控

python - 如何在XPath中选择多个标签?

sql - 查询具有一对多关系的 XML 数据

java - Android - 检查蓝牙连接是否丢失?

tomcat - Apache Tomcat 连接池和 Oracle 全局临时表。数据可以共享吗?

MySQL 数据库与 MySQL 服务器位于不同的服务器中

php - 有没有办法测试我的网站可以处理多少用户?

java - session 树 xml 表示为 java 对象