这个 web.xml 错误是什么意思? [英] What does this web.xml error mean?
问题描述
<块引用>
引用的文件包含错误 (http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd).有关更多信息,请右键单击问题视图中的消息并选择显示详细信息..."
通过文件web.xml"验证文件web-app_2_5.xsd"时检测到以下错误.在大多数情况下,这些错误可以通过直接验证web-app_2_5.xsd"来检测.但是,只有在 web.xml 的上下文中验证 web-app_2_5.xsd 时才会发生错误.
详细来说,我看到了一堆这样的:
<块引用>s4s-elt-character:除 xs:appinfo 和 xs:documentation 之外的架构元素中不允许使用非空白字符.看到 'var _U="undefined";'
如果将 j2ee
替换为 javaee
,它会正常工作.
要了解与此错误相关的任何进一步信息.请点击链接.您将在此处找到 Java EE 部署描述符 (web.xml) 的模式.
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd">
Referenced file contains errors (http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd). For more information, right click on the message in the Problems View and select "Show Details..."
The errors below were detected when validating the file "web-app_2_5.xsd" via the file "web.xml". In most cases these errors can be detected by validating "web-app_2_5.xsd" directly. However it is possible that errors will only occur when web-app_2_5.xsd is validated in the context of web.xml.
In details, I see a bunch of these:
s4s-elt-character: Non-whitespace characters are not allowed in schema elements other than xs:appinfo and xs:documentation. Saw 'var _U="undefined";'
If you replace j2ee
by javaee
, it will work fine.
EDIT :
<web-app version="2.5"
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_2_5.xsd">
Edit:
To know anything further related to this error. Please follow the Link. Here you will find schemas for Java EE deployment descriptors (web.xml).
这篇关于这个 web.xml 错误是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!