Servlet request attribute
A servlet request attribute is a named value attached to an individual HTTP request for access by request-processing components or view rendering.
Spring Security in Action, Second Edition
A request attribute is a named value attached to an HTTP request for access by components processing that request.
- How it is used
- Provides a handoff point for passing a CSRF token from CsrfFilter to a later servlet filter.
- How deep it goes
- Explains named-value retrieval, CsrfToken casting, filter ordering, and request testing, but not general servlet attribute internals.
- Examples
- Uses CsrfTokenLogger, the _csrf attribute, curl GET and POST requests, and HTTP 403 behavior.
- What you can do after
- Diagnose CSRF handling by retrieving and logging the token from a request attribute.
Read how Spring Security in Action, Second Edition explains servlet request attribute →
Spring in Action, Sixth Edition
A request attribute is a named value associated with an individual web request and made available to request-processing components or view rendering.
- How it is used
- Connects Spring MVC model data to Thymeleaf view rendering through servlet request attributes.
- How deep it goes
- Explains copying model data, reading values, and iterating collections, without detailing servlet internals.
- Examples
- Uses a message paragraph and a taco ingredient collection rendered with Thymeleaf expressions.
- What you can do after
- Apply it via Thymeleaf by reading named values and repeating markup for collection-valued attributes.
Read how Spring in Action, Sixth Edition explains servlet request attribute →
Related concepts
- MVC modelproduced by · An MVC model is the application component that represents application data and associated domain logic, making relevant state and behavior available to other components such as views.
- Thymeleafused by · Thymeleaf is a Java server-side template engine for generating HTML, markup, and other text-based documents from templates and model data.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

