Include JSTL dependency with Maven

后端 未结 7 1514
梦谈多话
梦谈多话 2020-12-24 11:51

I am using maven2, how do I add a dependency to JSTL (The JSP Standard Tag Library) ?

7条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-24 12:32

    The dependencies mentioned above is not enough for me(using Tomcat 5.x as servlet container, which doesn't provide JSTL implementation itself). It just imports the according JSTL interface package into project, and will cause a runtime error in Tomcat.

    Here is the dependency part used in my project, hopefully can help others out. The hardest part is the naming of the Apache's JSTL implementation in repository.

      
            javax.servlet
            jstl
            1.1.1
            runtime
        
        
            taglibs
            standard
            runtime
            1.1.1
        
        
            taglibs
            c
            1.1.1
            runtime
            tld
        
        
            taglibs
            fmt
            1.1.1
            runtime
            tld
        
    

提交回复
热议问题