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
JAAS
login in a web application running onJBoss EAP
? - After a successful
JAAS
login 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.xml
file:
<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.jsp
it 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, tools, and much more.