title: Jaas Basic Authentication tomcat 7
body: <p>I keep on getting the same error, 
  I have already changed the tomcat7w file that specifies the 
  jaas config file location</p>
  
  <pre><code>        javax.security.auth.login.LoginException: No LoginModules configured for    JaaSExample:
          at javax.security.auth.login.LoginContext.init(LoginContext.java:273)
      at javax.security.auth.login.LoginContext.&lt;init&gt;(LoginContext.java:514)
      at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:417)
      at org.apache.catalina.realm.JAASRealm.authenticate(JAASRealm.java:356)
      at org.apache.catalina.realm.CombinedRealm.authenticate(CombinedRealm.java:146)
      at org.apache.catalina.realm.LockOutRealm.authenticate(LockOutRealm.java:180)
      at    org.apache.catalina.authenticator.BasicAuthenticator.authenticate(BasicAuthenticator.java:166)
      at  org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:574)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
      at   org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:744)
  </code></pre>
  
  <p>I have already added this tom my tomcat7w.exe file.</p>
  
  <pre><code>    -Djava.security.auth.login.config=C:\Program Files (x86)\Apache Software                 Foundation\Tomcat 7.0\conf\jaas.config
  </code></pre>
  
  <p>another is that I also have this realm </p>
  
  <pre><code>    &lt;Realm className="org.apache.catalina.realm.JAASRealm" 
      appName="JaaSExample"
      userClassNames="Security.UserPrincipal" roleClassNames="Security.RolePrincipal" /&gt;
  </code></pre>
  
  <p>so what am I missing? please help me,</p>
  
  <p>I am using netbeans, tomcat 7.0.47.</p>
  
  <pre><code>thank you very much,
  </code></pre>
  
  <p>I have resolved to using glassfish!</p>