On reading more closely I find that this directive does not allow me to use
sessions at all.

What I want is to be able to turn them off to start, or at least not create
a new one if there is one in existence already, then turn them on when I
need them.

See if this bit of code helps explain what I mean:

This does not wok as the "off-switch" in the <[EMAIL PROTECTED] part is permanent.

<%@ page
 session="false"
%><%

// If this user has an active session... USE IT!
if(null != request.getSession(false))
{
 response.sendRedirect("myMainMenu.jsp");
}
else
{
 request.getSession();
}
%>



----- Original Message -----
From: "Harry Mantheakis" <[EMAIL PROTECTED]>
To: "Tomcat Users List" <[EMAIL PROTECTED]>
Sent: Monday, November 17, 2003 3:24 PM
Subject: Re: Can I find out if there is an active session from my JSP?


> Hello
>
> > What worries me is people who will bookmark the login screen, I would
like to
> > be able to check if they have an existing session and if so then forward
them
> > to the next .jsp (the main menu).  Unfortunately the login screen is a
.jsp so
> > it automatically creates a new session if there is not already one in
> > existence.  Is there any way to stop it doing this?
>
> Set the 'session' page directive to false:
>
> <[EMAIL PROTECTED] session="false" %>
>
> Regards
>
> Harry Mantheakis
> London, UK
>
>
> > Hello,
> >
> > I have recently moved my web-app to Form-based container managed logins.
> >
> > I like very much the side effect that this has which is that if you go
off to
> > another site and come back you are not given the login screen again.
> >
> > What worries me is people who will bookmark the login screen, I would
like to
> > be able to check if they have an existing session and if so then forward
them
> > to the next .jsp (the main menu).  Unfortunately the login screen is a
.jsp so
> > it automatically creates a new session if there is not already one in
> > existence.  Is there any way to stop it doing this?
> >
> > My thanks in advance as ever,
> >
> > Andoni.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


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

Reply via email to