I want to use LoginContext in the servlet as follows:
LoginContext ctx = new LoginContext("system", new MyCallbackHandler("root", "pramati"));
Well, I can logon very successfully without any LoginException thrown. The problem is, after this servlet is executed, I try to access any resource which is secured (added to security-constraints in web.xml), the container redirects me to Login.jsp, considering that the login is not yet done.
In short, I want to programmatically logon rather than using j_security_check.
Thanks in Advance