Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in JSTL expression evaluator #148

Open
rop49 opened this issue May 10, 2021 · 0 comments
Open

Bug in JSTL expression evaluator #148

rop49 opened this issue May 10, 2021 · 0 comments

Comments

@rop49
Copy link

rop49 commented May 10, 2021

When upgrading a legacy jsp-application with latest spring-boot dependencies,
it looks like we hit a minor bug in: javax.servlet:jstl:jar:1.2

Testcase:

<c:set var="zz" value="${1}" />
<c:if test="${(zz) > 0}">XXX</c:if>

in a jsp-file, yields a compilation-error:

[${(zz) > 0}] contains invalid expression(s): [javax.el.ELException: Error Parsing: ${(zz) > 0}]

This error did not occur in the older version.
For some reason, it seems it rejects the paranthesized expression: (zz)
when there is only a single variable inside.
Remove the parenthesis, and the error goes away.
Also, if you for example change the code to:
<c:if test="${(zz+zz) > 0}">XXX</c:if>
or
<c:if test="${(1) > 0}">XXX</c:if>
these are both accepted without any errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant