`
wowo12345
  • 浏览: 5258 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

Tomcat 7.0 配置 taglib

阅读更多
java.lang.IllegalArgumentException: taglib definition not consistent with specification version

这个错误是有由于 web.xml 2.5或者以上版本 中对<taglib>有了改变!

web.xml 2.5以前都是如下:
<taglib>
<taglib-uri>/s</taglib-uri>
<taglib-location>/WEB-INF/struts-tags.tld</taglib-location>
</taglib>

而 web.xml 2.5以后应该这样配置:
<jsp-config>
<taglib>
<taglib-uri>/s</taglib-uri>
<taglib-location>/WEB-INF/struts-tags.tld</taglib-location>
</taglib>
</jsp-config>
分享到:
评论
2 楼 wowo12345 2012-07-04  
1楼这位兄弟说的是对的,与tomcat无关,web.xml如果是 2.5或者以上
应该这样配置:
<jsp-config>
<taglib>
<taglib-uri>/s</taglib-uri>
<taglib-location>/WEB-INF/struts-tags.tld</taglib-location>
</taglib>
</jsp-config>
1 楼 huang_yong 2012-07-04  
这个貌似和Tomcat的版本没有关系吧,要看你的web.xml是什么版本的,2.4、2.5还是3.0?

相关推荐

Global site tag (gtag.js) - Google Analytics