How to resolve ServletException when trying to log in to the application multiple times from same browser?
Issue
Follow below steps to reproduce this issue.
-
Use
javax.servlet.httpapi in the code and userequest.login(),request.logout()andrequest.authenticate()methods for authentication. -
Refer this link for implementation of
programmatic authentication. -
open any browser (which supports multiple tab feature), and login to the application.
-
Try to open new tab in same browser and try to login with different user in that tab by keeping the session of first user alive.
-
while trying to login to the same browser using different tab and different user credentials, exception will be thrown.
[stderr ] javax.servlet.ServletException: JBWEB000053: Failed to authenticate a principal
[stderr ] at org.apache.catalina.connector.Request.login(Request.java:3228)
[stderr ] at org.apache.catalina.connector.RequestFacade.login(RequestFacade.java:1009)
Environment
- Red Hat JBoss Enterprise Application Platform
- 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.
