How do you use JSTL?

前端 未结 2 1396
野趣味
野趣味 2020-12-20 14:30

Trying to use JSTL but have the following problem:

Index.xhtml page:




        
相关标签:
2条回答
  • 2020-12-20 15:22

    I could solve the problem with adding xmlns:fmt="http://java.sun.com/jsp/jstl/fmt" in my xhtml file.

    OR

    declaring this in my web.xml, and copying the c.tld in /WEB-INF/jsp from my application:

    <jsp-config> 
            <taglib> 
                   <taglib-uri>http://java.sun.com/jsp/jstl/core</taglib-uri> 
                   <taglib-location>/WEB-INF/jsp/c.tld</taglib-location> 
            </taglib> 
    </jsp-config>
    

    Warning: xmlns:c="http://java.sun.com/jstl/core" throws exception, collected in my h:messages Tag

    0 讨论(0)
  • 2020-12-20 15:31

    Seems that:

    The solution is to remove the /jsp from the jstl namespace:

    xmlns:c="http://java.sun.com/jstl/core"

    See this post.

    0 讨论(0)
提交回复
热议问题