-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Stefan,
On 9/16/13 2:02 PM, Stefan Frei wrote: > The user should have a password which should change after a time > (eg one month). > > So how do i intercept a login request after j_security_check which > redirects the user to a „change your password“ page before > redirecting him (as it usually would be), to the url he requested > initially (of course this should only happen when users password > has expired)? We do this with a Filter. The container provides the authentication, but then we intercept the request to check for a "user" object in the session. If it's not there, we load it from the db, do all our checks, and redirect as appropriate. You don't need to do anything other than implement your own Filter class that does what you need, then register it with the container (usually via web.xml, but lots of folks like annotation-based configuration these days for some reason). - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.14 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJSN0kyAAoJEBzwKT+lPKRYIM4QAI/rlY2Pxhx1rYopqNmEr48c fKzt38Gl1NOfg5q9cDlG3gMQnH3fuR81vjd+75ILv8jROaakbmEWpa3RsP1f0s/b D6cagsLRkSVdrxLT56WhBKP0lWzRdZaXQBu8gux606ec0qqRlK9g/E9FQDFrbk3U B0newfzS3XRCjKBqmYtNStY4tI4NPJpYYg75iAVMNgQDyUbFq8mPT/Z7RtBYyyN3 q6asyzCr82aoUrl2kiSCR6I8+LTdfntUYBT5/hi1v/qL1ofVs/kw0YTWfJVieBU6 bv6LHWCb23M/LLYhg+YvalydioGBrPBccDbB2keGXezihbzQfRmJWntuXklXQjSe NZlMg+yHnE1mpm68YGatjbiC0IrHrFJeTcjncu/k6voKHDriuUq35vYNS19LEldX E2ZfiM/IGpPHDZkTi5XQZhbsocHJ7Nalaye3QxCKznwrcKr/Ei2jbxM//C2ixuaU V8/ZMaD6SoRi/CfkyviddOtTdNagk3Rcr+29ldjOCmU+IJkMQKDSxLVsIuT3PQTy 4kQo9wQ3pNbqllziah2CjT+VDBTV0MnMmBnxk/qtJUHOSaIvyJpxST+W72vSyGF6 vboTTqkz1GsYj7blyRQitdUh/jS51w+93ZR2zPq8NPtI0avWUgKDKCLfR+Q7EyQw lYZNpBmYVuo59oEBtupQ =j40b -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org