My doGet method is as follows:
public void doGet(HttpServletRequest req,
HttpServletResponse resp)
throws ServletException, java.io.IOException
{
HttpSession session = req.getSession(false);
if (session == null) {
// No action was given from a page. Present the
// initial login page.
resp.sendRedirect(resp.encodeRedirectUrl(pageLogin));
}
else {
java.io.PrintWriter out =
new java.io.PrintWriter(resp.getOutputStream());
// We have a user for the session. Display the
// main page
createMain(out,session);
out.flush();
out.close();
}
}
>>>>>>>>>>>>>>>>>
As you can see it basically redirects back to the login screen if the session is null,
or re-displays the main page if it's active.
Two Critical Questions I need answered:
1.) If a user's session is null, how do I determine if their session expired OR if
they just came to the site and haven't started a session yet.
If a user's session timed out, I want to send them to a "session expired" page, versus
the login page.
2.) My main page is frame-based. Whenever the page reloads, it goes to the page that
I specified in my createMain function. I want it to stay on the same page that I was
currently on. Is there a way?
Your help would be IMMENSELY appreciated.
Thank you!
___________________________________________________________________________
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