Skip to content

Implicit variable resolution is broken in JSP EvalTag #33942

Closed as not planned
Closed as not planned
@micopiira

Description

@micopiira

After upgrading to Spring Boot 3.4.0 (So Spring Framework 6.2.0) I noticed that for example, the following code on a JSP page throws an error: <spring:eval expression="pageContext.toString()"/> , while the same code does work on previous Spring Framework versions, for example 6.1.15.

After digging into the EvalTag code, I noticed that in the resolveImplicitVariable method the arguments for the ELResolver#getValue call are in the wrong order, thus causing the resolveImplicitVariable to always return null.

The signature for the method is:

public abstract Object getValue(ELContext context, Object base, Object property);

So I suppose the name parameter passed to resolveImplicitVariable should correspond to the property, not the base?

I could also try to provide a PR for this

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: webIssues in web modules (web, webmvc, webflux, websocket)status: supersededAn issue that has been superseded by anothertype: regressionA bug that is also a regression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions