public class LoginAction extends ActionSupport {
private String username;
private String password;
@Override
public String execute() throws Exceptio
By default page, request, session and application scope objects are available to JSP pages.
So you can access then using EL syntax.
And following table shows IMPLICIT objects available to EL.
Implicit object Description
1. pageScope Scoped variables from page scope
2. requestScope Scoped variables from request scope
3. sessionScope Scoped variables from session scope
4. applicationScope Scoped variables from application scope
5. param Request parameters as strings
6. paramValues Request parameters as collections of strings
7. header HTTP request headers as strings
8. headerValues HTTP request headers as collections of strings
9. initParam Context-initialization parameters
10. cookie Cookie values
11. pageContext The JSP PageContext object for the current page
So session and sessionScope are same but differs in context they are used.More specifically session is object and sessionScope is map (key, value) of Attribute and its value.
${session.sessionAttr} it refers to session object
available to JSP page.${sessionScope.sessionAttr} it refers to IMPLICIT
session object available to EL.${attrName} it will search attrName in all scope from page to application scope.