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

解决<%@taglib prefix="s" uri="/struts-tags"%>显示找不到

2013-05-22 15:43 309 查看
问题:

jsp中使用<%@taglib prefix="s" uri="/struts-tags"%>显示找不到

解决方法:

在web.xml中插入标签属性:

<taglib>
<taglib-uri>/struts-tags</taglib-uri>
<taglib-location>WEB-INF/struts-tags.tld</taglib-location>
</taglib>

对于servlet2.3版本,插入在<web-app></web-app>中即可;

对于servlet2.4版本,需插入在<jsp-config></jsp-config>中,其中jsp-config可以是web-app中的标签。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: