I am trying to execute JSP with JSTL, but I am not able to. I have Apache Tomcat 10, i.e. jakarta.servlet.*
instead of javax.servlet.*
. So whenever I execute the web app with JSTL 1.2.5 files, then I get the error:
jakarta.servlet.ServletException: java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/TagLibraryValidator
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:339)
at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:778)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
I tried to find a similar problem/question online that is resolved, but was not able to find it. How can I use JSTL in JSP with Tomcat 10?
My index JSP file code:
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<html>
<head>
<title>Tag Example</title>
</head>
<body>
<c:out value="${'Hello Yo'}"/>
</body>
</html>