设置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里
<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里
相关文章推荐
- cvc-complex-type.2.4.a错误解决方法
- cvc-complex-type.2.4.a: Invalid content was found starting with element 'async-supported'错误的解决方法
- cvc-complex-type.2.4.a错误解决方法
- eclipse中不能找到dubbo.xsd报错”cvc-complex-type.2.4.c“的 两种解决方法
- "cvc-complex-type.2.4.a: Invalid content was found starting with element ..."的解决方法
- cvc-complex-type.2.4.a错误解决方法
- cvc-complex-type.2.4.d:(...)No child element is expected at this point.的报错原因和解决方法
- mvc:exclude- mapping标签不识别报错:cvc-complex-type.2.4.a: Invalid content was found starting with element
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration的解决
- “cvc-complex-type.2.4.a: Invalid content was found starting with element 'taglib'”错误的解决办法
- 《Spring实战》-- 'cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element' 错误的解决办法
- 针对报出 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 'taglib'”错误的解决办法
- 解决cvc-complex-type.2.4.a: Invalid content was found starting with element 'page-encoding'. ..问题
- xml报错解决:cvc-complex-type.2.4.a: Invalid content was found starting with element
- cvc-complex-type.2.4.c 如何解决
- cvc-complex-type.2.4.c: 问题解决
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration的解决
- 针对报出 cvc-complex-type.2.4.a: Invalid content was found starting with element 问题解决办法
- cvc-complex-type.2.4.c 如何解决