[jboss-user] [Security & JAAS/JBoss] - Re: get loginexception back

johnn do-not-reply at jboss.com
Fri Feb 9 00:18:23 EST 2007


If you have access to the session then you possible have access to the j_exception attribute...

I am using Struts so I first check if j_exception is in the session with: (in your JSP):

   <logic:present name="j_exception">
  |        ...
  |    </logic:present>

if it is in the session, grab the object and use it:

           <%
  | 		LoginModuleException f = (LoginModuleException)session.getAttribute("j_exception");
  | 		if (f.getType()==0){
  | 			%>Check your Username / Password<br /><%
  | 		} else if (f.getType()==1) {
  | 			%>Check you are not logged in on another device<br /><%
  | 		}
  |            %>

hope this helps

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4013448#4013448

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4013448



More information about the jboss-user mailing list