我现在正使用myeclipse6.0.1里面自带的java ee 5的版本现在遇到的疑问是:如果我使用JSTL是否还要在WEB.XML中配置JSTL,,??有没有示例配置代码,感谢

解决方案 »

  1.   

    不用  只要你在你的JSP页面把TAGLIB引入就好
      

  2.   

    你用的是jstl1.0还是jstl1.1?
    1.0需要配置
    头部改成这样
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.3" 
    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_3.xsd">
    再加入
    <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>