use some bean (e.g. User) in session scope - this bean
is to be added into the session in response to login
form (when user is authenticated).
index.html -> login.jsp -> ....
login.jsp:
<% if (user_is_OK) {
pageContext.setAttribute("user", new
User(user_ID), PageContext.SESSION_SCOPE);
}
else {
// user is not OK - back to login form
response.sendRedirect("index.html");
// PageContext.forward() can be used too.
}%>
other pages/servlets:
<% User usr = pageContext.getAttribute("user",
SESSION_SCOPE);
if (usr == null) {
// user is not OK - back to login form
response.sendRedirect("index.html");
// PageContext.forward() can be used too.
}%>
Stepan
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
===========================================================================
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