今天在使用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。

Invalid content was found starting with element 'taglib'”的更多相关文章

  1. “cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'”错误的解决办法

    <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.4" ...

  2. 【解决方案】cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'. One of '{"http://java.sun.com/xml/ns/javaee":run-as, "http://java.sun.com/xml/ns/javaee":security-role-r

    [JAVA错误] cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'. One o ...

  3. web.xml文件报错:cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'.

    <?xml version="1.0" encoding="UTF-8"?> <web-app version="3.0" ...

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

    在写xml的时候又一次总是报cvc-complex-type.2.4.a: Invalid content was found starting with element 错误,还出现小红叉,在网上找 ...

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

    web.xml 出现cvc-complex-type.2.4.a: Invalid content was found starting with element <web-app xmlns= ...

  6. shiro中async-supported报错 cvc-complex-type.2.4.a: Invalid content was found starting with element 'async-supported'. One of '{"http://java.sun.com/xml/ns/ javaee":init-param}' is expected.

    最近都在研究shiro这个框架,今天实施了一下,就报了如下错误: cvc-complex-type.2.4.a: Invalid content was found starting with ele ...

  7. Type cvc-complex-type.2.4.a: Invalid content was found starting with element 'build'.错误的解决方法

    项目突然间爆出了这样的问题: Description Resource Path Location Typecvc-complex-type.2.4.a: Invalid content was fo ...

  8. 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 'display-name'. One of '{&qu ...

  9. cvc-complex-type.2.4.a: Invalid content was found starting with element ‘init-param’(转)

    在写xml的时候又一次总是报cvc-complex-type.2.4.a: Invalid content was found starting with element 错误,还出现小红叉,在网上找 ...

随机推荐

  1. uva12489 Combating cancer(树同构)

    转载请注明出处: http://www.cnblogs.com/fraud/          ——by fraud https://uva.onlinejudge.org/index.php?opt ...

  2. Python同时向控制台和文件输出日志logging的方法 Python logging模块详解

    Python同时向控制台和文件输出日志logging的方法http://www.jb51.net/article/66756.htm 1 #-*- coding:utf-8 -*- 2 import ...

  3. 用angularjs遇到的坑们

    最近在用angularjs做一些东西,由于学艺不精,对angularjs了解不够,导致经常会不小心掉进一些自己挖的坑里(⊙_⊙),在这里记下来,谨防又踩. 1.angularjs ng-show no ...

  4. 详解CSS设置默认字体样式

    浏览器默认的样式往往在不同的浏览器.不同的语言版本甚至不同的系统版本都有不同的设置,这就导致如 果直接利用默认样式的页面在各个浏览器下显示非常不一致,于是就有了类似YUI的reset之类用来尽量重写浏 ...

  5. A*八数码

    帮同学写的八数码,启发式搜索 创建两个表open,close,分别用的stl中的优先队列priority_queue和map,好久没写过代码了,bug调了半天 #include <iostrea ...

  6. Objective-C Http常用API 同步请求与异步请求

    开发iOS应用要调用Http接口.获取Http资源,有一套比较成熟的框架ASIHTTPRequest.而我还是比较喜欢使用原始一点的 API,而它跟其他的面向对象语言有许多共通之处.本文分同步请求和异 ...

  7. LeetCode_Scramble String

    Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrin ...

  8. sp_xml_preparedocument _使用 处理XML文档

      有时会在存储过程中处理一些XML格式的数据,所以会用到sp_xml_preparedocument,他可以将XML数据进行读取,然后使用 MSXML 分析器 (Msxmlsql.dll) 对其进行 ...

  9. Configuring HTTP and HTTPS

    Configuring HTTP and HTTPS .NET Framework (current version)   Other Versions   WCF services and clie ...

  10. list排序成员函数对string对象与char*对象排序的差别

    对list容器中的对象排序,不能使用sort()算法,只能采用其自身的排序函数sort().因为,算法sort()只支持随机存取的容器的排序,如vector等. 对基本数据对象list排序:成员函数s ...