> Wow, only one response for my last question. I'll re-phrase it this
time
> maybe it'll read clearer than before.
>
> Can someone suggest a way to implement a login/logout mechanism using
> JSP/Servlets/Beans and a Database?
I didn't really get your security requirements but I'd say the easiest
way is to have bean in session scope (that is kind of what session scope
is for...).
Then on every "secure" page you start with checking if the user is
logged "into the bean". If they are not logged in, forward them to a
login page. Preferably do this in a common include file, like the one
below.
For example
__ loginInclude.jsp __
<jsp:useBean id="sessionBean" scope="session"
class="yourcompany.SessionBean" />
<%
if( ! sessionbean.isLoggedIn() )
((HttpServletResponse)pageContext.getResponse()).sendRedirect("login.jsp
");
%>
You figure out the login page yourself.
Mattias Jiderhamn
Expert Systems
[EMAIL PROTECTED]
Mattias Jiderhamn
Expert Systems
[EMAIL PROTECTED]
�
==========================================================================To
unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets