Check this out from the following url
http://wiki.jboss.org/wiki/Wiki.jsp?page=SecurityFAQ
anonymous wrote : Q7: Why does getUserPrincipal/getPrincipal return null after a JAAS
login
| A7: The only time getUserPrincipal/getPrincipal return a non-null value is when the
user has authenticated to the container. Doing a JAAS login from within a servlet/ejb
method is simply executing an independent authentication against the corresponding JAAS
login configuration.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4136461#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...