tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Using multiple login pages
Date Tue, 04 Oct 2011 18:48:48 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

André,

On 10/4/2011 2:01 PM, André Warnier wrote:
> Christopher Schultz wrote: ...
> 
> (I agree with what precedes this)
>> 
>> So, you can sniff the original request URI and serve-up whatever 
>> flavor of login page you want.
> 
> But with declarative security, that's kind of hard to do, no ? 
> Can't do that with a Servlet Filter.

Something like this:

<form-login-page>/login.jsp</form-login-page>

login.jsp:

<%
  if(original_uri.equals("/one_thing"))
  {
    dispatcher.include("/login_form_A.jsp");
  }
  else if(original_uri.equals("/another_thing"))
  {
    dispatcher.include("/login_form_B.jsp");
  }
  else
  {
   dispatcher.include("/login_form_default.jsp");
  }
%>

That's not terribly difficult to do. You can use whatever logic you want.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6LVRAACgkQ9CaO5/Lv0PCn6QCgl/ncRiyICo1reGjEi7kK9x+S
xh4AoIdC5yS+fX6AnbUP3Z4sn5N81yLU
=jvTt
-----END PGP SIGNATURE-----

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


Mime
View raw message