Keep a parameter in the session, called "loggedIn". When the session first
starts initialize it to "0". When the browser tries to access a secure page,
check the session parameter. If "0", redirect to a logIn servlet that will
set "loggedIn" to "1".


----- Original Message -----
From: Gael Stehagen <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 09, 2000 11:39 AM
Subject: Sessions...


> I'm wondering what the best way is to restrict access to some pages.
> If a user tries to access a page that requires authentication, he should
> be redirected to a login-page, unless he's all ready logged in.
>
> How do I manage this in best way?
> Thanks
> Gael
>
> --
> ************************
> Gael Stehagen
> [EMAIL PROTECTED]
> 0708-882910
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to