I am trying to access Secured EJB in jBoss with tomcat from servlet using structs.When i try to access the methods of the Secured EJB from servlet it gives me saying that the principal is null.I had used the JAAS for this in my servlet.the code is below
UsernamePasswordHandler handler = new UsernamePasswordHandler(loginName, password.toCharArray()); try
LoginContext loginContext = new LoginContext(CLIENT_AUTHENTICATION_LOGINMODULE, handler);
and then i acll the methods of the EJB here..The same code works perfect when run aganist stand alone application.It does show me the principal and calls the methods accordingly with permissions set in the ejb-jar.xml.The same thing fails when i try to call the methods from servelet.????
thanks in advance