Is the Model.class(or request scope) affected in any way by the current session or actions done to that current session?
One scenario below,
Real life application would be request->user logging off-> request access.
model.addAttribute("inputForm",inputForm);
session.invalidate();
if(model.containsAttribute("inputForm")) //true or false?
Some artifact I have dug up,
" In struts-config.xml scope = "session" means throught the application ( till the session gets expired). Your can keep the values in session no matter how many JPSs you are visiting of that application. It remains there in session until you close your browser.
scope="request" means for that particular action only you are keeping the values. In this if you call another action or redirects to another JSP , it gets removed.
Another difference is that :- request - Beans that are visible within a single JSP page, as well as to any page or servlet that is included in this page, or forwarded to by this page. (Request attributes)
session - Beans that are visible to all JSP pages and servlets that participate in a particular user session, across one or more requests. (Session attributes) "- http://www.coderanch.com/t/462078/Struts/Difference-Request-scope-Session-scope - Vinod Vinu
More about scopes How to choose the right bean scope?