my preference would be to set up a user package or something,
but if you want to use include, you could do this:

<%@ include file="components/access.jsp" %>
if(enforceLogin(request))
{
        // normal stuff
}
else
{
        // redirect to page or error message
}


-----Original Message-----
From: Dion Almaer [mailto:[EMAIL PROTECTED]]
Sent: 19 October 1999 16:53
To: [EMAIL PROTECTED]
Subject: Global Methods


Hi -

I want to have a call "enforceLogin()" on every page... to enforce the
fact that the user is logged in. What is the cleanest way to do that?

At first I thought of doing:

<%@ include file="components/access.jsp" %>
enforceLogin();

in each page... and then access.jsp would have:

<%! public void enforceLogin() { ... } %>

However the enforceLogin() method needs access to the request object....
so that doesn't seem like it will work.

Any help would be greatly appreciated.

Dion

--
         \\|//
         (o o)
+----oOOo-(_)-oOOo--------------------------------------------------+
|   [EMAIL PROTECTED]   | "The English certainly and fiercely pride   |
| www.almaer.com/dion |  themselves in never praising themselves."  |
+-------------------------------------------------------------------+

========================================================================
===
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to