0

Edit the file web.xml session timeout value

<session-config>
        <session-timeout>
            30
        </session-timeout>
</session-config>
Community
  • 1
  • 1
sami
  • 5
  • 2
  • 2
  • 5

1 Answers1

3

To set a variable in session, you need not edit Web.xml

HttpSession session = request.getSession();
String al="am session variable"
session.setAttribute("al", al);

and to access it , you can simply do ${sessionScope.al}

Read How do you store Java objects in HttpSession?

Community
  • 1
  • 1
Santhosh
  • 8,181
  • 4
  • 29
  • 56