-
1. Re: Exception handling Custom Login module
krishh Dec 29, 2005 3:20 PM (in response to krishh)This part of code in my Custom Login Module throws LoginException
protected Group[] getRoleSets() throws LoginException {
Group[] newRoleSets = null;
HttpSession session=null;
try {
Group[] roleSets = super.getRoleSets();
newRoleSets = addRoleAssignment(roleSets);
} catch (Exception e) {
logger.error("Exception raised " + e);
//handling the exception for the jsp page.
throw new LoginException("Exception raised in getRoleSets(): \n"+e.toString());
}
// return super.getRoleSets();
return newRoleSets;
}
When a LoginException raises the authentication error is passed to the browser and customerror page is displayed as configured in the web.xml
<error-page>
<error-code>401</error-code>
/unrestricted_pages/loginError.jsp
</error-page>
along with this I wanted to display the error message causing the LoginException raised. Can anyone tell if there is a way to do that. -
2. Re: Exception handling Custom Login module
jason.greene Dec 29, 2005 3:21 PM (in response to krishh)how is this related to web services?
-Jason -
3. Re: Exception handling Custom Login module
krishh Dec 29, 2005 5:21 PM (in response to krishh)This issue is not related to the web services. The issue is related to the role mapping in the JAAS security. We have our role mapping in WAS defined in the ibm-application-bnd.xmi bindings. There is no way to implement this in JBOSS. For this reason I had to implement the Custom Login Module to do the role mappings.
The CLM worked fine but was not throwing exceptions onto the browser and we had to go to server logs to see if there is an error.
But the solution to this issue is:
http://wiki.jboss.org/wiki/Wiki.jsp?page=ExtendedFormAuthenticator
Thanks for all who looked into this thread. -
4. Re: Exception handling Custom Login module
krishh Dec 30, 2005 1:50 PM (in response to krishh)I am seeing that I am in JBoss.com -> JBoss User -> Security & JAAS/JBoss
I think this is the one where I should be posting my questions.