Hi all
First of all i don't know in which forum i should have posted this issue, so i choose this forum randomly.
The problem i m facing is that i am getting an exception which looks like this.
java.lang.SecurityException: Unable to locate a login configuration
at com.sun.security.auth.login.ConfigFile.<init>(Unknown Source)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at javax.security.auth.login.Configuration$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.Configuration.getConfiguration(Unknown Source)
at javax.security.auth.login.LoginContext$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.init(Unknown Source)
at javax.security.auth.login.LoginContext.<init>(Unknown Source)
I am trying to implement basic window authentication in my web project on
tomcat 6. When i start the server, the window pops up for
user name and password. My tomcat-users.xml looks like this.
<role rolename="tomcat"/>
<role rolename="role1"/>
<user username="tomcat" password="tomcat" roles="tomcat"/>
<user username="both" password="tomcat" roles="tomcat,role1"/>
<user username="role1" password="tomcat" roles="role1"/>
<user username="anurag" password="tomcat" roles="tomcat,role1"/>
and when i enter the credentials i get the above exception.
FYI i have set the following environments variable
1. catalina_home to tomcat root path.
2. catalina_opts to tomcat's conf file path.
Please help me because its driving me crazy.
Regards
Anurag