How to redirect to a specific page after JAAS login in a web application running on JBoss EAP?
Issue
- How to redirect to a specific page after
JAASlogin in a web application running onJBoss EAP? - After a successful
JAASlogin is it possible to immediately redirect to a different page? -
Is the following scenario possible in JBoss EAP?
- The User has following specified in
web.xmlfile:
<security-constraint> <web-resource-collection> <web-resource-name>MySecuredResource-1</web-resource-name> <url-pattern>/secured/*</url-pattern> </web-resource-collection> <auth-constraint> <role-name>JBossAdmin</role-name> </auth-constraint> </security-constraint> <login-config> <auth-method>FORM</auth-method> <form-login-config> <form-login-page>/login.jsp</form-login-page> <form-error-page>/loginfail.jsp</form-error-page> </form-login-config> </login-config> <security-role> <role-name>JBossAdmin</role-name> </security-role>- The user hits
http://localhost:8080/loginApp/secured/showPrivateData.jsp, beforelogin, it will be forward to login.jsp - After the successful
login, instead of coming back toshowPrivateData.jspit should go to a page sayLanding.html.
- The User has following specified in
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
