JSP page directive – session

 The session attribute, when set to true, sets the page to make use of sessions.

NOTE: by default, the session attribute value is set to true therefore, all JSP pages have session data available. If the user sets the session attribute to false, it should be performed in this section. When the session attribution is set to false, the user cannot use the session object, or a <jsp:useBean> element with scope=session in the JSP page which, if used, would give error.

Syntax of session attribute available for page directive is 

<%@ page session=”true|false” %> 

In the above statement page and session are keywords. And either true or false value can be setted and by default the value is true.

Leave a Reply

Your email address will not be published. Required fields are marked *