您的位置:首页 > 编程语言 > Java开发

设置Strut标签时语法报错——cvc-complex-type.2.4.a的解决方法(转)

2009-09-07 22:35 399 查看
在web.xml中设置strut标签,如下:
   <taglib>
      <taglib-uri>/tags/struts-bean</taglib-uri>
      <taglib-location>/WEB-INF/lib/struts-bean.tld</taglib-location>
    </taglib>  
    <taglib>
      <taglib-uri>/tags/struts-html</taglib-uri>
      <taglib-location>/WEB-INF/lib/struts-html.tld</taglib-location>
    </taglib>  
    <taglib>
      <taglib-uri>/tags/struts-logic</taglib-uri>
      <taglib-location>/WEB-INF/lib/struts-logic.tld</taglib-location>
    </taglib>
但是在eclipse中,语法报错:
     cvc-complex-type.2.4.a
解决办法:
    把所有跟jsp设置有关的内容都放在<jsp-config></jsp-config>里面。
    如下所示:
  <jsp-config>
   <taglib>
      <taglib-uri>/tags/struts-bean</taglib-uri>
      <taglib-location>/WEB-INF/lib/struts-bean.tld</taglib-location>
    </taglib>  
    <taglib>
      <taglib-uri>/tags/struts-html</taglib-uri>
      <taglib-location>/WEB-INF/lib/struts-html.tld</taglib-location>
    </taglib>  
    <taglib>
      <taglib-uri>/tags/struts-logic</taglib-uri>
      <taglib-location>/WEB-INF/lib/struts-logic.tld</taglib-location>
    </taglib>
   </jsp-config>
文章出处:DIY部落(http://www.diybl.com/course/1_web/webjs/20071128/88353.html)
 
我就是把jsp-config放在了taglib里
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  eclipse jsp
相关文章推荐