弄了两天 我他妈......一直弄不了 下载两个包不管用 我fuck 我靠 我操他妈的 。。。。
终于 今天弄好了 妈的 这么简单 把老子弄死
很简单 是因为我下载的jstl.jar 与 stand.jar 都是单独下的,没有带c.tld文件 这个文件是配置c标签的文件
官网链接 我放到上面了。
下载好之后
1, 解压 将;lib 包下的jar文件放到tomcat--->lib文件中
2,在eclipse项目名后面 右键 properties--->最左边(java Build Path) --->点libraries--->点旁边的
Add External JARs 添加包,给你们截个图:
3,你刚才解压的那个包中有个c.tld文件 拷到你web项目下的WEB-INF下,别弄到lib里面了
然后在web.xml中配置一下命令:
<jsp-config>
<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
</jsp-config>
这个只可以用c标签,如果你想用其他的,把这个文件都配置上,把解压包里带的.tld文件都放到web-inf下,然后都配置一下,我给大家列出来:
<taglib>
<taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri>
<taglib-location>/WEB-INF/fmt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/fmt-rt</taglib-uri>
<taglib-location>/WEB-INF/fmt-rt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/c.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/core-rt</taglib-uri>
<taglib-location>/WEB-INF/c-rt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/sql</taglib-uri>
<taglib-location>/WEB-INF/sql.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/sql-rt</taglib-uri>
<taglib-location>/WEB-INF/sql-rt.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/x</taglib-uri>
<taglib-location>/WEB-INF/x.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>http://java.sun.com/jstl/x-rt</taglib-uri>
<taglib-location>/WEB-INF/x-rt.tld</taglib-location>
</taglib>
</jsp-config>
这就可以了,想用哪个配置哪个,确实很方便!