cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'错误

原创 2012年03月21日 10:35:40

今天在使用struts-menu制作菜单,在web.xml中写入

   <taglib>
     <taglib-uri>/WEB-INF/struts-menu.tld</taglib-uri>
     <taglib-location>/WEB-INF/struts-menu.tld</taglib-location>
   </taglib>  

后,提示“cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'”错误。

修改为:

  <jsp-config>
   <taglib>
     <taglib-uri>/WEB-INF/struts-menu.tld</taglib-uri>
     <taglib-location>/WEB-INF/struts-menu.tld</taglib-location>
   </taglib>  
  </jsp-config>

后解决。

----------------------------------------

<jsp-config>标签使用详解
<jsp-config> 包括<taglib> 和<jsp-property-group> 两个子元素。
   
   其中<taglib>元素在JSP 1.2时就已经存在;而<jsp-property-group>是JSP 2.0 新增的元素。
     <jsp-property-group>元素主要有八个子元素,它们分别为:
   
     1.<description>:设定的说明;
     2.<display-name>:设定名称;
     3.<url-pattern>:设定值所影响的范围,如:/CH2 或 /*.jsp;
     4.<el-ignored>:若为true,表示不支持EL 语法;
     5.<scripting-invalid>:若为true,表示不支持<% scripting %>语法;
     6.<page-encoding>:设定JSP 网页的编码;
     7.<include-prelude>:设置JSP 网页的抬头,扩展名为.jspf;
     8.<include-coda>:设置JSP 网页的结尾,扩展名为.jspf。


相关文章推荐

解决cvc-complex-type.2.4.a: Invalid content was found starting with element 'page-encoding'. ..问题

编写web.xml配置文件时错误 错误提示:cvc-complex-type.2.4.a: Invalid content was found starting with element 'page...

cvc-complex-type.2.4.a: Invalid content was found starting with element

http://henatne.iteye.com/blog/837186

ActiveMQ Invalid content was found starting with element

在配置mirroredQueue的时候,destinationInterceptors标签提示Invalid content was found starting with element。 解决方...

cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element

- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for eleme...

cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element

log4j:WARN No appenders could be found for logger (org.springframework.core.env.StandardEnvironment)...

Weblogic报错VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected elements解决方法

在weblogic10.3上部署项目,在tomcat上顺利的部署完成,但是在weblogic上就报了错。 网上也查了好多资料始终没有解决,就到weblogic的目录下用sample的文件打成war并...

cvc-complex-type.2.3: Element 'beans' cannot have character [children], because the type's content t

导入maven项目后报错,cvc-complex-type.2.3: Element 'beans' cannot have character [children], because the typ...

cvc-complex-type.2.4.a错误解决方法

在使用web.xml描述文件中指定对标签的引用时: /demotag/WEB-INF/tlds/mytag.tld 出现了以下错误: cvc-complex-type.2.4.a: Invali...

配置SpringMVC的<init-param>标签时的错误cvc-complex-type.2.4.a

配置web.xml中dispatcherServlet的初始化上下文路径时,出现如下错误: 配置文件信息如下: [html] view plain copy   ...
内容举报
返回顶部
收藏助手
不良信息举报
您举报文章:cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'错误
举报原因:
原因补充:

(最多只允许输入30个字)