Thnx for the reply people, one thing that Andreas pointed out to me from the spec :


"Indicates that the page requires participation in an (HTTP)session.
If true then the implicit script language variable named session
of type javax.servlet.http.HttpSession references the
current/new session for the page.
If false then the page does not participate in a session; the
session implicit variable is unavailable, and any reference to
it within the body of the JSP page is illegal and shall result in
a fatal translation error.
efault is true."



it says that the session is unavailabe, now is it for that page and that page cannot participate in the session or the session is not created at all for that page and hence saving the session object instantiation.

Razi


From: "Allistair Crossley" <[EMAIL PROTECTED]>
Reply-To: "Tomcat Users List" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Subject: RE: Myth or Best practice : <%@ page session="false" %>
Date: Wed, 15 Dec 2004 14:53:04 -0000

In terms of Jasper, Tomcat's JSP engine, it appears that a HttpSession is set to null if session="false" therefore no instance is made.

In terms of the JSP Spec, session="true" by default.

In terms of whether it is best practice to set session="false" when yuo know you don't need a session I have no idea. I suppose it makes sense if it saves an instantiation of HttpSession, I've never done it.

Perhaps a Jasper dev/others can comment.

Allistair.

> -----Original Message-----
> From: Razi Ansari [mailto:[EMAIL PROTECTED]
> Sent: 15 December 2004 14:18
> To: [EMAIL PROTECTED]
> Subject: Myth or Best practice : <%@ page session="false" %>
>
>
> <%@ page session="false" %>
>
> Hello people
>
> I wanted to enquire from the experts about something that I had read.
>
> Is it true that inculuding the above directive in a jsp will
> prevent the
> session object from being
> created for that jsp, hence avoiding the creation of
> unnecessary objects??
>
> Or Is it just that the session object will not be available
> for that jsp ??
>
> what is the opinion of gurus out here, Can the inclusion of the above
> directive be considered
> as a best practice to be followed.
>
> Pls enlighten me . All replies will be valued and appreciated.
>
> Thnx for clicking and reading through.
>
> Warm Regards
> Razi
>
> _________________________________________________________________
> Take a break! Find destinations on MSN Travel.
> http://www.msn.com.sg/travel/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


<FONT SIZE=1 FACE="VERDANA,ARIAL" COLOR=BLUE> ------------------------------------------------------- QAS Ltd. Developers of QuickAddress Software <a href="http://www.qas.com";>www.qas.com</a> Registered in England: No 2582055 Registered in Australia: No 082 851 474 ------------------------------------------------------- </FONT>


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
Download MSN Messenger emoticons and display pictures. http://ilovemessenger.msn.com/?mkt=en-sg



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to