On 09-May-2000 Gael Stehagen wrote:
> 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.

If've solved this like this:

VRManager vrm = VRManager.isAlreadyLoggedOn(request);

        if ( vrm == null ) {
              response.sendRedirect("login page");
        } else  {
                blah blah
        }

Where is logged in check the existince of a user object.

The user object is pushed into the session upon a valid login.

Works for me with a site with 7000 registered users doing forula1 related stuff
so it's quite busy lately.

Wouter
--
Mphasis Media BV.                         Interactive architects
Wouter Boers <[EMAIL PROTECTED]>   http://www.MphasiS.com
Phone: +31 (0)71 5238575                  Fax: +31 (0)71 5238576
Wouter Boers <[EMAIL PROTECTED]>                http://www.ikke.net

___________________________________________________________________________
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