I am a bit unclear, it seems request.getAttribute (or setAttribute) is for application scope i.e. shared accross all servlets in the application.
Is there something that I can get/set on a per request (not session, but per web request) scope?
Example, in a filter, I may want to add something for this request only that I get then retrieve in my servlet’s doGet.
This is not true. This is only applicable to those methods on
ServletContext. You’re apparently mixing it withHttpServletRequestor misinterpreting the concrete problem you’re currently facing, but didn’t tell anything about in your question. TheHttpServletRequestinstance and all of its attributes is definitely request scoped.See also: