How does one know what value to give for the
The term scope used with
ServletRequestAttributes is unrelated to bean scopes.
ServletRequestAttributes defines scope as one of request and session
Accesses objects from servlet request and HTTP session scope, with no distinction between "session" and "global session".
It provides access to request and session attributes through these possible
scope values. Constants for these are defined in
Note that the current implementation of
ServletRequestAttributes only ever considers two scenarios. Either you provide
SCOPE_REQUEST and it attempts to find a request attribute or you provide any other value (not necessarily
SCOPE_SESSION), it ignores it, and attempts to find a session attribute.
RequestAttributes implementations may use different