4 Replies Latest reply on Oct 27, 2002 12:40 AM by Mike Pettit

    No server context set

    annapurna Newbie

      Hi,

      This must be a small problem.. I am new to JAAS.. tried to login using loginContext()
      private void authenticateThroughJAAS(String userName , String
      password){
      CallbackHandler handler = new UsernamePasswordHandler(userName,
      password.toCharArray());
      LoginContext lc = null;
      try {
      lc = new LoginContext("simple",handler);

      lc.login();
      }catch (javax.security.auth.login.LoginException ex){

      ex.printStackTrace();
      }



      This part works fine. I try to create a stateful session bean and want to get the CallerPrincipal it says No Security Context set.. is there anything I have to do to make this work..

      Need this badly...

      Thanks,
      Anna