您的位置:首页 > 理论基础 > 计算机网络

http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed wit

2015-07-05 19:00 916 查看
异常:The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved in either web.xml or the jar files deployed with this application

这是由于页面中用了struts标签的原因。

解决方法:

1。下载jstl1.1 解压后把lib文件夹下的jstl.jar和standard.jar拷贝到项目的WEB—INF/lib文件夹下。到此结束即可。假设还须要tld等。

再做下面操作。

(并把tld文件夹下的c.tld放到WEB—INF文件夹下)

2。在web.xml中增加例如以下语句

<jsp-config>

<taglib>

<taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri>

<taglib-location>/WEB-INF/c.tld</taglib-location>

</taglib>

<taglib>

<taglib-uri>http://java.sun.com/jsp/jstl/xml</taglib-uri>

<taglib-location>/WEB-INF/x.tld</taglib-location>

</taglib>

<taglib>

<taglib-uri>http://java.sun.com/jsp/jstl/fmt</taglib-uri>

<taglib-location>/WEB-INF/fmt.tld</taglib-location>

</taglib>

<taglib>

<taglib-uri>http://java.sun.com/jsp/jstl/sql</taglib-uri>

<taglib-location>/WEB-INF/sql.tld</taglib-location>

</taglib>

</jsp-config>

jstl 下载:http://jakarta.apache.org/site/downloads/downloads_taglibs-standard.cgi
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: