| Author |
session attribute in page directive
|
swapnel surade
Ranch Hand
Joined: Mar 05, 2009
Posts: 129
|
|
Hi,
<%@page session="true" %>
I'm not getting the meaning of session attribute.
Please explain this.
|
 |
Chinmaya Chowdary
Ranch Hand
Joined: Apr 21, 2008
Posts: 432
|
|
|
Hi, Swapnel. The page that declares <%@page session="true" %>, tells the container that this page participates in session. So the container creates session implicit object. If it is declared with "false", the container will not provide session implicit object. So, is not able to participate in the session.
|
 |
swapnel surade
Ranch Hand
Joined: Mar 05, 2009
Posts: 129
|
|
what if I create session object in the scriptlet.
Will it create new session or return the same one ?
|
 |
Chinmaya Chowdary
Ranch Hand
Joined: Apr 21, 2008
Posts: 432
|
|
|
Hi, Swapnel. If we say<%@ page session="false" %>, then the session will not available to the page, even if you call pageContext.getSession() in scriptlet.
|
 |
 |
|
|
subject: session attribute in page directive
|
|
|