1

I am pulling my hair out!

I am using Eclipse IDE for Enterprise Java and Web Developers Version: 2022-06 (4.24.0)

My POM references version 2.0.0 of jstl

    <!-- https://mvnrepository.com/artifact/org.glassfish.web/jakarta.servlet.jsp.jstl -->
    <!-- https://stackoverflow.com/a/4928309/6578837 -->
    <dependency>
        <groupId>org.glassfish.web</groupId>
        <artifactId>jakarta.servlet.jsp.jstl</artifactId>
        <version>2.0.0</version>
    </dependency>

My project uses Jakarta libraries (as it's written to run on Tomcat 10) My project is reporting The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path on all jsp files that include a reference to the taglibs:

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/xml" prefix="x"%>``
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>

I have seen and tried many ways to fix this including: https://stackoverflow.com/a/4076706/6578837 I have spent 2 days on trying to resolve this but have not been able to solve it.

The project runs fine on both the local Tomcat install and the one on the product server.

Paul
  • 31
  • 9
  • 2
    Which jstl version are you using? – XtremeBaumer Jun 28 '22 at 13:13
  • Version 2.0.0 - I've updated question to reflect this as it's useful. Thanks – Paul Jun 28 '22 at 13:33
  • 1
    Is this a Dynamic Web Project, and if so, what is the Dynamic Web Module facet version set to? Which version of Tomcat is on the project's Java Build Path? If not Tomcat itself, then which servlet API jars? – nitind Jun 28 '22 at 13:43
  • Just a Maven Java project. Targeted runtime is 'Apache Tomcat v10.0' – Paul Jun 28 '22 at 14:45
  • How are you doing both of those things in one project? How would I reproduce it? – nitind Jun 29 '22 at 14:28
  • @paul Can you provide those details? – nitind Jul 02 '22 at 20:17
  • @nitind, HI, I'm in the middle of moving it all to a Dynamic Web Project as this seems the better way to go (and so far has also eliminated all of the errors I was seeing before, I just cannot compile it to a war file (as there seems to be an issue with the JUnit tests) – Paul Jul 04 '22 at 09:37
  • Created new Dynamic web project. Copied all code over to new DWP in Eclipse (with Dynamic Web Module set to '5.0'). All is good now. Not an answer though. (Looking at previous project, Dynamic Web Module was set to '3.0'!) – Paul Jul 11 '22 at 14:27
  • If you still have the old project, would you be willing to try opening it in 2022-09, revalidating it, and seeing what the Problems view shows? – nitind Sep 11 '22 at 22:15
  • Really sorry but I don't have the project any more. Thanks for the support though :) – Paul Sep 21 '22 at 08:17

0 Answers0