you have typo in the search string try search for "javax.servlet"
I have done recently upgrade from Tomcat9 to Tomcat 10.1

Try searching in included jsp pages
Maybe you use JSTL tags?

Regards,
Zdenek

On Thu, Nov 27, 2025 at 2:51 PM Luke Kolin <[email protected]> wrote:
>
> Thanks for the suggestion. Unfortunately there are no imports in that JSP,
> and "java.servlet" doesn't exist anywhere in the code base.
>
>
> On Thu, Nov 27, 2025 at 9:07 AM Zdeněk Henek <[email protected]> wrote:
>
> > Hi,
> >
> > Are you sure there are no javax.servlet.... imports in afvHome.jsp ?
> >
> > This looks like you have there the javax. classes in jsp pages.
> >
> > Try Openrewrite
> > https://docs.openrewrite.org/recipes/java/migrate/jakarta/jakartaee10
> > to migrate from javax to jakarta package names where needed.
> > Note some javax package prefixes are not renamed to jakarta.
> >
> > Regards,
> > Zdenek Henek
> >
> > On Thu, Nov 27, 2025 at 12:55 PM Luke Kolin <[email protected]> wrote:
> > >
> > > I am attempting to port a (very old) app from Tomcat 9 to Tomcat 11,
> > using
> > > the new servlet/JSP package names. The app is built using an (even older)
> > > Ant build script that uses JSPC to precompile the JSPs. One webapp builds
> > > correctly, but the second fails - precompilation apparently succeeds, but
> > > the compiled JSPs use the "old" javax.servlet packages instead of the
> > newer
> > > jakarta.servlet packages. Here's brief excerpt of the ant output:
> > >
> > > [jasper2] Nov 27, 2025 7:46:25 AM org.apache.jasper.servlet.TldScanner
> > > scanJars
> > >
> > > [jasper2] INFO: At least one JAR was scanned for TLDs yet contained no
> > > TLDs. Enable debug logging for this logger for a complete list of JARs
> > that
> > > were scanned but no TLDs were found in them. Skipping unneeded JARs
> > during
> > > scanning can improve startup time and JSP compilation time.
> > >
> > > [jasper2] Nov 27, 2025 7:46:25 AM org.apache.jasper.JspC processFile
> > >
> > > [jasper2] INFO: Built file [/jsp/main/afvHome.jsp]
> > >
> > > [jasper2] Nov 27, 2025 7:46:25 AM org.apache.jasper.JspC execute
> > >
> > > [jasper2] INFO: Generation completed with [0] errors in [6] milliseconds
> > >
> > > [javac] Compiling 1 source file to
> > > C:\Users\LUKE~1.MAD\AppData\Local\Temp\afv\build\jsp
> > >
> > > [javac]
> > >
> > C:\Users\LUKE~1.MAD\AppData\Local\Temp\afv\src\jsp\net\afva\jsp\main\afvHome_jsp.java:24:
> > > error: package javax.servlet.jsp does not exist
> > >
> > > [javac] private static final javax.servlet.jsp.JspFactory _jspxFactory =
> > >
> > > [javac] ^
> > >
> > > [javac]
> > >
> > C:\Users\LUKE~1.MAD\AppData\Local\Temp\afv\src\jsp\net\afva\jsp\main\afvHome_jsp.java:108:
> > > error: package javax.el does not exist
> > >
> > > [javac] private volatile javax.el.ExpressionFactory
> > _el_expressionfactory;
> > >
> > > [javac] ^
> > >
> > > [javac]
> > >
> > C:\Users\LUKE~1.MAD\AppData\Local\Temp\afv\src\jsp\net\afva\jsp\main\afvHome_jsp.java:123:
> > > error: package javax.el does not exist
> > >
> > > [javac] public javax.el.ExpressionFactory _jsp_getExpressionFactory() {
> > >
> > > [javac] ^
> > >
> > > [javac]
> > >
> > C:\Users\LUKE~1.MAD\AppData\Local\Temp\afv\src\jsp\net\afva\jsp\main\afvHome_jsp.java:261:
> > > error: package javax.servlet.http does not exist
> > >
> > > [javac] public void _jspService(final
> > javax.servlet.http.HttpServletRequest
> > > request, final javax.servlet.http.HttpServletResponse response)
> > >
> > > [javac] ^
> > >
> > > [javac]
> > >
> > C:\Users\LUKE~1.MAD\AppData\Local\Temp\afv\src\jsp\net\afva\jsp\main\afvHome_jsp.java:261:
> > > error: package javax.servlet.http does not exist
> > >
> > > [javac] public void _jspService(final
> > javax.servlet.http.HttpServletRequest
> > > request, final javax.servlet.http.HttpServletResponse response)
> > >
> > > [javac] ^
> > >
> > > Why does JSPC use the "old" package names, and is there anything I can do
> > > to force it? Again, the other webapp seems to work correctly, but I am
> > > unsure of the differences.
> > >
> > > Thanks in advance
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to