Hi All,
Posting the question in new thread agian...
i am using the following code to authenticate user with LDAP...
InitialContext ctx = new InitialContext();
JaasSecurityManager jsm1 = (JaasSecurityManager) ctx.lookup("java:/jaas/myLoginModule");
String securityDomain = jsm1.getSecurityDomain();
SecurityAssociationHandler handler = new
SecurityAssociationHandler();
Principal user = new SimplePrincipal(j_username);
handler.setSecurityInfo(user, j_password.toCharArray());
LoginContext loginContext = new LoginContext(securityDomain,
(CallbackHandler)handler);
loginContext.login();
Subject subject = loginContext.getSubject();
This way it works and is validating the user but when i call this method (request.getUserPricipal() ) is giving me NULL..
Is there any way that i can pass authentication to Servlet like we have in weblogic?
Thanks,
Nick