dwr错误cvc-complex-type.2.4.a: Invalid content was found starting with element 'display- name'. One o
来源:互联网 发布:真三国无双6mac版 编辑:程序博客网 时间:2024/06/07 03:13
在文本,xml配置时,出现<display-name>的错误cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-
name'. One of '{"http://java.sun.com/xml/ns/j2ee":servlet-class, "http://
java.sun.com/xml/ns/j2ee":jsp-file}' is expected.
原因是2.4的规范导致。用2.3就可以了,不过这个对项目没什么影响。
web.xml如下
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
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_3.xsd">
<servlet>
<servlet-name>dwr-invoker</servlet-name>
<display-name>DWR Servlet</display-name>
<servlet-class>uk.ltd.getahead.dwr.DWRServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>true</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>der-invoker</servlet-name>
<url-pattern>/dwr/*</url-pattern>
</servlet-mapping>
</web-app>
然后创建dwr.xml在web-inf下如下:
<!DOCTYPE dwr PUBLIC
"-//GetAhead Limited//DTD Direct Web Remoting 1.0//EN"
"http://www.getahead.ltd.uk/dwr/dwr10.dtd">
<dwr>
<allow>
<convert match="com.apress.ajaxprojects.instamail.MessageDTO" converter="bean"/>
<create javascript="OptionsManager" creator="new">
<param name="class" value="com.apress.ajaxprojects.instamail.OptionsManager"/>
</create>
</allow>
</dwr>
在这个示例中 DWR被赋予了吧任何MessageDTO类型对象转换成一个相应的js对象的权限。同时DWR被赋予了调用OptionsManager类的权限,而其他类是不允许调用的。注意java的大部分基本数据都有默认的转换器。
- dwr错误cvc-complex-type.2.4.a: Invalid content was found starting with element 'display- name'. One o
- cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of '{"
- cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'.
- cvc-complex-type.2.4.a: Invalid content was found starting with element 'async-supported'. One of
- cvc-complex-type.2.4.a: Invalid content was found starting with element 'servlet-pattern'. One of
- cvc-complex-type.2.4.a: Invalid content was found starting with element 'attribute'. One of '{"http:
- cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'错误
- “cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'”错误的解决办法
- cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'错误
- cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'错误
- cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'错误
- cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'错误
- cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'错误
- “cvc-complex-type.2.4.a: Invalid content was found starting with element 'book'”错误的解决办法
- “cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'”错误的解决办法
- cvc-complex-type.2.4.a: Invalid content was found starting with element 'async-supported'. 错误
- cvc-complex-type.2.4.a: Invalid content was found starting with element
- cvc-complex-type.2.4.a: Invalid content was found starting with element
- 随笔
- Android启动流程
- 纯CSS菜单导航(三)竖向
- 汇编指令手册
- 只运行一个程序实例
- dwr错误cvc-complex-type.2.4.a: Invalid content was found starting with element 'display- name'. One o
- Android系统文件夹结构解析
- python 字典操作
- JS判断浏览器是否为IE6
- FSAA(全景反锯齿)简介
- XP远程登录设置
- 正确设定MySQL中的字符集,解决终端乱码问题
- iphone multitouch 不起作用原因
- Android 操作系统平台任务