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

Incorrect SpEL syntax in reference documentation [SPR-16315] #20862

spring-projects-issues opened this issue Dec 19, 2017 · 3 comments
status: backported type: documentation


Copy link

spring-projects-issues commented Dec 19, 2017

Sviatoslav Hryb opened SPR-16315 and commented

Spring Framework Reference (Testing) contains incorrect code fragment in section 3.5.6. Testing request and session scoped beans

The incorrect fragment is:


    <bean id="userService"
            c:loginAction-ref="loginAction" />

    <bean id="loginAction" class="com.example.LoginAction"
        <aop:scoped-proxy />


The problem is that c:username="&#123;request.getParameter('user')&#125;" should have prefix #&#123; for correct SpEL syntax. The same is true for c:password="&#123;request.getParameter('pswd')&#125;"

Affects: 4.3.13, 5.0.2

Referenced from: commits 8aa94ae, 0d151b0

Backported to: 4.3.14

Copy link
Collaborator Author

spring-projects-issues commented Jan 7, 2018

Juergen Hoeller commented

Stéphane Nicoll, this seems to be an escaping problem... Any insight into asciidoc's behavior here?

Oddly enough, we were only escaping the '#' character in the first case before. Removing that escape sequence made the character disappear in three places now, also in the session.getAttribute('theme') example further below.

Copy link
Collaborator Author

spring-projects-issues commented Jan 8, 2018

Stéphane Nicoll commented

That block was using verbatim substitution but there was no need to do that. I've removed it and the code snippet is fine now. Also backported to 4.3.x.

Copy link
Collaborator Author

spring-projects-issues commented Jan 13, 2018

Sam Brannen commented


I thought I fixed that in this commit, but obviously I did not.

Thanks, Stéphane Nicoll!

@spring-projects-issues spring-projects-issues added status: backported type: documentation labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 5.0.3 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
status: backported type: documentation
None yet

No branches or pull requests

2 participants