nas*_*saa 1 java servlets weblogic
我正在尝试将我的web.xml从2.3升级到2.4,所以我将我的web.xml更改为这样的 -
<?xml version="1.0" encoding="UTF-8"?>
<!--<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.1
Servlet 2.4//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd">-->
<!--
===========================================================
WUI - WEB.XML
===========================================================
-->
<web-app id="WebApp" 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_4.xsd"
version="2.4">
<description>Odyssey Web User Interface</description>
<display-name>wui</display-name>
<!-- Uncomment this when setting up the prevent-multiple-login mechanism -->
<!--
<listener>
<listener-class>com.xxx.xxxnListener</listener-class>
</listener>
-->
<!-- local cache filter setup -->
<filter>
<filter-name>local-cache</filter-name>
<filter-class>com.xxx.xxxcheFilter</filter-class>
</filter>
....
Run Code Online (Sandbox Code Playgroud)
当我启动我的服务器时,我收到此错误 -
weblogic.descriptor.DescriptorException:验证问题发现问题:cvc-complex-type.2.4a:预期元素'servlet-class @ http://java.sun.com/xml/ns/javaee jsp-file @ http:/ /java.sun.com/xml/ns/javaee'而不是'display-name @ http://java.sun.com/xml/ns/javaee'元素servlet @ http://java.sun.com/xml/ns/javaee:问题:cvc-complex-type.2.4a:预期元素'servlet-class @http://java.sun.com/xml/ns/javaee jsp-file @ http:// java. sun.com/xml/ns/javaee'而不是'description @ http://java.sun.com/xml/ns/javaee'元素servlet @ http://java.sun.com/xml/ns/ JavaEE的:
我正在使用weblogic 10.1服务器.
知道我还应该做什么.
谢谢.
您web.xml需要更改以传递新XSD的结构.例如,新的XSD声明您的web.xml文件应具有:
<servlet-class>或<jsp-file>作为您目前所在地的元素 <display-name>
请阅读http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd上的XSD以获取更多详细信息,重新构建它不需要很长时间就可以通过.
| 归档时间: |
|
| 查看次数: |
15369 次 |
| 最近记录: |