0 Replies Latest reply on Oct 2, 2001 12:47 PM by deepa

    Not able to find client-side login modules

    deepa Newbie

      Hi everyone,

      I have an application that uses a ClentLoginModule on the client-side and the DatabaseServerLoginModule on the server-side. I have a class called Authenticate that does the login. The code is as follows:


      public boolean authenticated(String user, String pass) throws Exception
      boolean login = false;
      char[] password = pass.toCharArray();

      { System.setProperty("java.security.auth.login.config","file://C:/projects/0341_ardec_ebf/lib/jboss/client/auth.conf");
      AppCallbackHandler handler = new AppCallbackHandler(user, password);
      LoginContext lc = new LoginContext("other",handler);
      System.out.println("Created LoginContext");
      catch (LoginException le)
      System.out.println("Login failed");

      return login;


      (For test purposes)When a simple client class calls the above mentioned Authenticate class method, the login takes place perfectly and everything works fine.

      However, in the application I have created, the client is a servlet(required) that calls the above mentioned class method to authenticate. However, I get the following messages:
      [EmbeddedTomcatSX] Login failed
      [EmbeddedTomcatSX] javax.security.auth.login.LoginException: No LoginModules con
      figured for other
      [EmbeddedTomcatSX] at javax.security.auth.login.LoginContext.init(LoginCont
      I know this is happening because when the "LoginContext lc = new LoginContext("other",handler);" is called, it searches for "other" in the jboss.home/conf/tomcat/auth.conf file instead of jboss.home/client/auth.conf file.
      Does anyone know how I can fix this error? Please help!!!


      Deepa George