0 Replies Latest reply on May 24, 2002 7:14 AM by Rama Kumar

    Security Exception : When trying to access secured

    Rama Kumar Newbie

      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);
      catch(Exception e)
      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