日期:2014-05-16 浏览次数:20308 次
转到?http://www.java-cn.com/technology/tech/3502.html
?
?
1.准备jstl?
到http://apache.towardex.com/jakarta/taglibs/standard/下载jakarta-taglibs-standard-current.zip?
解压后成为jakarta-taglibs-standard-1.1.1?
2.准备web开发目录?
比如我的web目录为h:\webapp\myweb\(当然可以把你的web应用放在%tomcat_home%\webapps\),称为工作目录 Working folder,在工作目录h:\webapp\myweb\下建立WEB-INF\lib,WEB-INF\classes?
3.拷贝.jar文件?
将jakarta-taglibs-standard-1.1.1\lib\下的两个jar文件:standard.jar和jstl.jar文件拷贝到\WEB-INF\lib\下?
4.拷贝.tld文件?
将jakarta-taglibs-standard-1.1.1\tld\下的8个tld类型文件拷到"Working folder\WEB-INF\"下?
5.在\WEB-INF\下建立web.xml文件:?
<?xml version="1.0" encoding="ISO-8859-1"?>?
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"?
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"?
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee?http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"?
version="2.4">?
<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<