0

My application is running on Tomcat 9. I want to use servlet 4.0 and taglibs in my jsp application.

Header of my jsp is :

Error is : Can not find the tag library descriptor for "http://java.sun.com/jsp/jstl/core"

To solve the issue I have added JSTL dependency but the servlet version does not match to 4.0.

The following dependency belongs to servlet 2.4.

<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>jstl</artifactId>
    <version>1.2</version>
</dependency>

The following dependency belongs to servlet 2.5.

<dependency>
    <groupId>org.glassfish.web</groupId>
    <artifactId>javax.servlet.jsp.jstl</artifactId>
    <version>1.2.5</version>
</dependency>
Jeffrey
  • 19
  • 2
  • What error do you get ? – Camille Vienot Aug 30 '18 at 11:08
  • org.apache.jasper.JasperException: The absolute uri: [http://java.sun.com/jsp/jstl/core] cannot be resolved in either web.xml or the jar files deployed with this application – Jeffrey Aug 30 '18 at 11:36
  • [1] Your post states _"Header of my jsp is :"_, but there is nothing following that. Can you update your post to fix that? [2] See [this SO answer for the error message you are getting](https://stackoverflow.com/a/4928309/2985643). That answer is over 7 years old, so obviously it does not apply to your specific problem and the versions you are using, but its very detailed explanation may be helpful anyway. – skomisa Aug 30 '18 at 23:12

1 Answers1

0

It must be a dependency project problem.

I managed to get spring-boot jsp sample running.

It embeds version 9.0.10 of tomcat and depends on version 1.2 of jstl library

Camille Vienot
  • 727
  • 8
  • 6
  • The artifact javax.servlet:jstl:1.2 is vulnerable to XML External Entity (XXE) Injection (https://snyk.io/vuln/SNYK-JAVA-JAVAXSERVLET-30449). – cviniciusm Apr 13 '21 at 23:16
  • The artifact org.apache.taglibs:taglibs-standard-impl:1.2.5 is not vulnerable. – cviniciusm Apr 13 '21 at 23:17