今天在使用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. Dom对象和jQuery包装集

    Dom对象 在传统的JavaScript开发中,我们经常都是首先获取Dom对象,比如: document.getElementById("dv1"); 我们经常使用getEleme ...

  2. MVC---404页面配置

    参考地址1:http://benfoster.io/blog/aspnet-mvc-custom-error-pages 参考地址2:https://msdn.microsoft.com/en-us/ ...

  3. Dom4j 添加 / 更新 / 删除 XML

    1.获得文档 /** *1.获得解析流 *2.解析XML */ 2.添加 /** *1.获取父元素 *2.创建元素 *3.创建属性并添加到元素中 *4.元素添加到根节点 */ 3.更新 /** *1. ...

  4. Kali Linux 常见问题解答

    更新Kali apt源 vim /etc/apt/sources.list #开始 deb http://http.kali.org/kali kali-rolling main non-free c ...

  5. PHP程序员衰老后的下场

    长期从事编程活动的程序员都期望在50多岁时能爬到一个足够高的职位,或者能顺利的退休. 但我在这里讨论的可能是一个你还没有想过的问题:如果到那时你失业了呢? 50多岁时你的职业仕途会成为一个问题.如果你 ...

  6. Python 一路走来 DOM & Jquery

    DOM           查找:                直接查找                间接查找                —getElementById             ...

  7. iOS开发之多媒体API(1)

    iOS开发之多媒体API(1)       播放视频 视频文件介绍 视频格式可以分为适合本地播放的本地影像视频和适合在网络中播放的网络流媒体影像视频两大类.尽管后者在播放的稳定性和播放画面质量上可能没 ...

  8. Unity3d有关图形尺寸大小的注意事项

    主要参考了官方文档,然后根据个人的理解撰写该文.Unity3D支持的图形文件格式有 PSD, TIFF, JPG, TGA, PNG, GIF, BMP, IFF, PICT(但根据本人的亲手测试,U ...

  9. bindingredirect 没有效果

    在搞在线聊天室的时候用到了SignalR 1.1.4,依赖于Newtonsoft.Json 4.5.0.0. 而我另外的dll又依赖Newtonsoft.Json 6.0.0.0 我只引用6.0.0. ...

  10. cf D. Renting Bikes

    http://codeforces.com/contest/363/problem/D 先对b和p排序,用二分求出可以租的车子的最大辆数,其中用mid以后的个人钱数去租前mid的价钱的车子. #inc ...