spring-projects / spring-projects/spring-security

Freemarker JspTagLibs support breaks under EE11

Open
#19,260 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

status: waiting-for-triage type: bug
Dominant language
Java
Stars
9.6k
Forks
6.3k
Avg merge
2d 11h
Merged PRs (30d)
52

Description

Describe the bug

The Spring Security JSP taglib, used in Freemarker templates, breaks under EE11.

To Reproduce

Create a Freemarker template using the taglib, eg:

<#assign security=JspTaglibs["http://www.springframework.org/security/tags"] />
<sec:authorize access="isAuthenticated()">
Logged in
</sec:authorize>

Visiting the page results in a stack trace similar to:

jakarta.servlet.ServletException: Handler processing failed: java.lang.NoClassDefFoundError: jakarta/servlet/jsp/el/VariableResolver
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:986)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:866)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1000)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:892)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:633)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:874)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:723)

Expected behavior

JspTagLibs should work under EE11 the same way as EE10.

Sample

See https://stackoverflow.com/questions/79914234/is-freemarker-2-3-34-compatible-with-jakarta-ee11

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Freemarker JspTagLibs example under EE11 and compare it with EE10, using the reported NoClassDefFoundError as the entry point. Trace the Spring Security JSP taglib integration and identify where jakarta.servlet.jsp.el.VariableResolver is referenced. Done means the same template works under EE11 as it does under EE10, with coverage for the failing case.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend, security
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.