Question

I am trying to use JAAS for my servlet application. I could get a basic JAAS simple authentication (non-servlet) working.

But with the servlet where to i set this variable? -Djava.security.auth.login.config=test_jaas.config

I also tried exporting JVM_OPTS to this as per this page http://www.kopz.org/public/documents/tomcat/jaasintomcat.html

But I still keep getting, "No LoginModules configured" while creating LoginContex.

Any help is appreciated.

Was it helpful?

Solution

It depends on the servlet container. If you're using Tomcat you have to configure a JAAS realm. See the Tomcat configuration documentation under Realms.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top