tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From footh <fo...@yahoo.com>
Subject Form-based login question - explicit login
Date Fri, 05 Nov 2004 20:45:50 GMT
I have a quick question regarding Tomcat's form-based
login.  I have it working fine for pages that are
listed as protected.  For ex, if a user hits a
protected page, they are redirected to a login page,
we'll call it "login_required" that says the requested
resource requires a login.  If they fail the login,
the error page, we'll call "login_invalid", appears
which looks just like the login_required page except
it says invalid login, please try again.  If the user
logs in correctly on any of these pages, they are
redirected to the original protected page.  This works
great.

But, the user can explicitly log in by clicking on a
"log in" link everywhere on the site.  I have a an
idea of how to do this, but I have a couple of
questions regarding this idea.

I was going to create a "login_dummy" page, a
protected page that is the source of all the "login"
links throughout the site.  When this page is hit, the
whole forms-based login process will occur.  When the
user finally authenticates, the login_dummy page will
just redirect them to the home page.

The questions I have are 1) I would really like to
direct the user to the page they were on when they
clicked the "login" link.  I can't figure out how to
do that.  And 2) This method requires that I use the
"login_required" page described above (the form
attached to the form-based login) which will contain
text like "the requested resource requires a login,
etc, etc."  When they click on a login link, they
aren't accessing a protected resource, they are just
logging in.  So, I really need a different login page
(or just different introductory text).  However, I
don't know how to differentiate that I'm coming from a
direct login link.

The latter issue isn't a big deal, I could always just
use a generic login page.  Anyway, does anyone have
any ideas of how I might be able to implement this?

Thanks,

JF


		
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message