Quick revision
The short answer
Tomcat 10 and later implement Jakarta EE 9 and newer, where every javax.servlet.* class became jakarta.servlet.*, so the old JSTL jars and custom tags compiled against javax classes cannot load; that is why the old taglib URI cannot be resolved and TagSupport throws ClassNotFoundException. The plan is to switch to a Jakarta JSTL API and implementation, update taglib URIs to jakarta.tags.core, recompile custom tag handlers against jakarta.servlet.jsp.tagext and update the TLD files, using the Tomcat Jakarta EE migration tool or OpenRewrite to speed it up, test every page, and use the moment to retire pages nobody needs.
What to remember
In this answer, we saw that Tomcat 10.1 implements jakarta.servlet APIs, so old JSTL jars and custom tags compiled against javax classes fail with unresolved taglib URIs and ClassNotFoundException. The fix is the Jakarta JSTL API and implementation with jakarta.tags.* URIs, custom tags recompiled against jakarta.servlet.jsp.tagext with updated TLDs, OpenRewrite for source and the Tomcat migration tool for binary jars, tests that open every page, and retiring pages that nobody uses.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
Tomcat 10 and later implement Jakarta EE 9 and newer, where every javax.servlet.* class became jakarta.servlet.*, so the old JSTL jars and custom tags compiled against javax classes cannot load; that is why the old taglib URI cannot be resolved and TagSupport throws ClassNotFoundException. The plan is to switch to a Jakarta JSTL API and implementation, update taglib URIs to jakarta.tags.core, recompile custom tag handlers against jakarta.servlet.jsp.tagext and update the TLD files, using the Tomcat Jakarta EE migration tool or OpenRewrite to speed it up, test every page, and use the moment to retire pages nobody needs.
Why this question is asked
Upgrading Tomcat used to be routine, but the jump from Tomcat 9 to 10 is different: it is the point where the Java EE APIs were renamed. Old JSP applications tend to break loudly on that jump, and the errors look confusing because the code itself did not change. Interviewers ask this scenario to see whether we can read those errors, explain the cause, and plan a migration that does not turn into weeks of guessing. In this answer, we will explain the namespace change, decode both errors, fix JSTL and custom tags, look at tools that automate the work, and plan the testing and clean-up.
1A Quick Recap of the javax to jakarta Change
Java EE was handed to the Eclipse Foundation and renamed Jakarta EE. The javax package names could not be used for new versions, so Jakarta EE 9 renamed every API package, for example javax.servlet.http.HttpServlet became jakarta.servlet.http.HttpServlet and javax.servlet.jsp.tagext.TagSupport became jakarta.servlet.jsp.tagext.TagSupport, without other changes.
Tomcat 9 implements Servlet 4 under javax. Tomcat 10.0 implements Servlet 5 (Jakarta EE 9) and Tomcat 10.1 implements Servlet 6 (Jakarta EE 10), both under jakarta. A class compiled against javax.servlet refers to classes that simply do not exist in Tomcat 10.1, and the JVM cannot find them.
2Decoding the Two Errors
The first error, The absolute uri: http://java.sun.com/jsp/jstl/core cannot be resolved, appears because Tomcat itself does not ship JSTL. Our application used to bundle an old JSTL jar (javax.servlet:jstl 1.2), whose TLD maps that URI to tag classes built on javax.servlet.jsp. On Tomcat 10.1, that jar either fails to load or is not seen as a valid tag library, so the URI has no match. The second error, ClassNotFoundException: javax.servlet.jsp.tagext.TagSupport, is our own custom tag handler: its class extends the javax version of TagSupport, which no longer exists on the classpath.
3Fixing JSTL and the Taglib URIs
We replace the old JSTL jar with the Jakarta Tags API (jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api, version 3.0 for Tomcat 10.1) and an implementation, commonly org.glassfish.web:jakarta.servlet.jsp.jstl. Then we update the taglib directives. Jakarta Tags 3.0 defines short URIs such as jakarta.tags.core, jakarta.tags.fmt and jakarta.tags.functions. Implementations may still recognise the old http://java.sun.com URIs for compatibility, so check the implementation you choose, but moving to the new URIs avoids relying on that.
A simple search and replace over the JSPs and tag files handles the URIs. We also remove the old jstl and standard jars from WEB-INF/lib, because a leftover javax jar can still confuse tag library scanning.
4Recompiling Custom Tags and Updating TLDs
Custom tag handlers must be recompiled against the Jakarta Pages API. We change the imports from javax.servlet.jsp.tagext to jakarta.servlet.jsp.tagext and javax.servlet to jakarta.servlet, depend on jakarta.servlet.jsp-api as provided, and rebuild. The TLD files that describe the tags also need their XML namespace and version updated to the Jakarta schema (web-jsptaglibrary for version 3.0 or later); a TLD that still points at the old Sun schema may load in some cases but should be updated. Tag files (.tag) need no code changes beyond their taglib URIs.
5Tools That Do Most of the Work
For our own source, OpenRewrite has recipes that migrate javax imports, dependencies and XML descriptors to Jakarta EE, run through the Maven or Gradle plugin. It produces a reviewable diff instead of a manual hunt.
For third-party jars we cannot rebuild, the Apache Tomcat migration tool for Jakarta EE rewrites the bytecode and resources of a jar or war from javax to jakarta. Tomcat 10 and later can also apply this conversion automatically to applications placed in a separate legacy deployment folder (webapps-javaee); check your Tomcat version's documentation. These conversions are a good bridge, but a converted jar is unsupported territory, so the long-term goal is a native Jakarta version of each library.
- InventoryJSPs, TLDs, custom tags, javax jars
- Retire unused pagesAccess logs show what is used
- Source changesOpenRewrite: imports, POM, descriptors
- DependenciesJakarta JSTL API and implementation
- Binary-only jarsTomcat migration tool, or replace
- Test every pageAutomated page tests on Tomcat 10.1
- Deploy and monitorWatch logs for
JasperException
7 steps in order. Play them, or step through them one at a time.
6Testing and Deciding What to Keep
JSP errors appear only when a page is first compiled, so a successful startup proves little. We need a test that requests every page, ideally with realistic data, and fails on any 500 or JasperException. Even a simple crawler over the list of URLs from access logs catches most problems, and browser tests cover the important flows.
The access logs also show which pages nobody has opened in a year. Every retired page is one less page to migrate and test, so we delete them first. The migration is also the right moment to decide whether the remaining pages should stay JSP for now, or whether frequently changed areas should move to another view technology such as Thymeleaf or a separate front end.
7Follow-up questions
Can we run the old application on Tomcat 10.1 without changing anything?
Partly. Tomcat's legacy deployment folder can convert the whole war from javax to jakarta at deployment time, which often works for simple applications. It is a useful short-term bridge, but it hides the problem, slows deployment and leaves us with unsupported converted libraries, so plan a real migration.
Why not stay on Tomcat 9?
Tomcat 9 still receives security fixes for now, but it is the last javax line and its support will end; check the Tomcat site for current dates. Modern frameworks such as Spring Framework 6 and Spring Boot 3 require jakarta, so staying on Tomcat 9 also blocks other upgrades.
What about Spring MVC tags such as form:form?
Spring's own tag library moved to jakarta in Spring Framework 6, so upgrading Spring to version 6 or later brings jakarta-compatible spring and form tags. The taglib URIs for Spring's tags did not change.
8Conclusion
In this answer, we saw that Tomcat 10.1 implements jakarta.servlet APIs, so old JSTL jars and custom tags compiled against javax classes fail with unresolved taglib URIs and ClassNotFoundException. The fix is the Jakarta JSTL API and implementation with jakarta.tags.* URIs, custom tags recompiled against jakarta.servlet.jsp.tagext with updated TLDs, OpenRewrite for source and the Tomcat migration tool for binary jars, tests that open every page, and retiring pages that nobody uses.
Open with
Both errors come from the javax to jakarta rename. Tomcat 10 and later implement Jakarta EE 9 and newer, where javax.servlet became jakarta.servlet, so anything compiled against the old packages cannot load.
Then, if they want more
Tomcat does not ship JSTL, and the app bundled the old javax JSTL jar, so the URI http://java.sun.com/jsp/jstl/core no longer resolves to a working tag library. And the custom tag extends javax.servlet.jsp.tagext.TagSupport, which simply is not on the classpath anymore. My plan: inventory pages, TLDs, tag classes and javax jars, and use the access logs to delete pages nobody opens.
Replace JSTL with the Jakarta Tags API and an implementation such as the Glassfish one, and update taglib URIs to jakarta.tags.core; some implementations still accept the old URIs, but I would not rely on it. Recompile the tag handlers against jakarta.servlet.jsp.tagext and update the TLDs to the Jakarta schema.
OpenRewrite can do the source changes, and for third-party jars I cannot rebuild, the Tomcat Jakarta EE migration tool converts the bytecode as a bridge. JSP errors only appear when a page is compiled, so I would add a test that opens every page on Tomcat 10.1 and fails on any JasperException.
About this answer
- Last updated
- 12 November 2026
- Versions it names
- Jakarta EE 9, Spring Framework 6, Jakarta EE 10, Spring Boot 3
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Jakarta EE specifications
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "A JSP application moving from Tomcat 9 to Tomcat 10.1 fails: pages show 'The absolute...": https://scrivio-interview-library.netlify.app/java/servlets/fbd82982db/