I am using maven2, how do I add a dependency to JSTL (The JSP Standard Tag Library) ?
Tomcat does not provide the Java Server Tag Library (JSTL), which is required to use JSP pages as Spring views. The IdP status page at /idp/status is built with JSP and will not work without this library. You can download it from here, place it into idp.
JSTL stands for JSP Standard Tag Library. JSTL is the standard tag library that provides tags to control the JSP page behavior. JSTL tags can be used for iteration and control statements, internationalization, SQL etc.
Spring provides a couple of out-of-the-box solutions for JSP and JSTL views. Using JSP or JSTL is done using a normal view resolver defined in the WebApplicationContext . Furthermore, of course you need to write some JSPs that will actually render the view.
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.
<dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.1.1</version> <scope>runtime</scope> </dependency> <dependency> <groupId>taglibs</groupId> <artifactId>standard</artifactId> <scope>runtime</scope> <version>1.1.1</version> </dependency> <dependency> <groupId>taglibs</groupId> <artifactId>c</artifactId> <version>1.1.1</version> <scope>runtime</scope> <type>tld</type> </dependency> <dependency> <groupId>taglibs</groupId> <artifactId>fmt</artifactId> <version>1.1.1</version> <scope>runtime</scope> <type>tld</type> </dependency>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With