JAAS config file

Discussion in 'Java' started by Marius Hintermann, Jul 3, 2003.

  1. Where can I specify the location and name of a JAAS config file in a
    JSP? (I'm using Tomcat) Setting the system property
    "java.security.auth.login.config" in catalina.bat seems not to work.

    Marius
     
    Marius Hintermann, Jul 3, 2003
    #1
    1. Advertising

  2. To specify the location of the JAAS Config file for Tomcat, the best
    thing to do is create a file in your Tomcat/bin directory called
    setenv.sh (if it doesn't already exist). Then set a variable called
    JAVA_OPTS in this script file, like:

    JAVA_OPTS="-Djava.security.auth.login.config={FULL PATH OF JAAS CONF}"

    Then you need to export JAVA_OPTS.

    This approach has worked for me!

    PS If you are using Windows, then the file is setenv.bat, not
    setenv.sh!! Also, best to avoid editing your catalina.bat file if
    possible!!!

    Emmanuel Bourg <> wrote in message news:<bebq9l$lbp$>...
    > I use to put the JAAS config file in WEB-INF/classes, and on logging i
    > use this :
    >
    > URL configURL =
    > this.getClass().getClassLoader().getResource("login.config");
    > System.setProperty("java.security.auth.login.config",configURL.toString());
    >
    > LoginContext loginContext = new LoginContext("ApplicationLogin");
    > loginContext.login();
    >
    > It works with WebSphere/4.0.3 and Orion/2.0.1
    >
    > hope that helps
    >
    > Emmanuel
    >
    >
    > Marius Hintermann wrote:
    >
    > > Where can I specify the location and name of a JAAS config file in a
    > > JSP? (I'm using Tomcat) Setting the system property
    > > "java.security.auth.login.config" in catalina.bat seems not to work.
    > >
    > > Marius
     
    Ian DaBodewijk, Jul 23, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joel Beach

    JAAS question...

    Joel Beach, Sep 18, 2003, in forum: Java
    Replies:
    1
    Views:
    447
    Michiel Konstapel
    Sep 19, 2003
  2. davout
    Replies:
    0
    Views:
    401
    davout
    Oct 24, 2003
  3. davout
    Replies:
    0
    Views:
    423
    davout
    Oct 25, 2003
  4. CSharpner
    Replies:
    0
    Views:
    1,143
    CSharpner
    Apr 9, 2007
  5. kampy
    Replies:
    9
    Views:
    374
    Steven D'Aprano
    Oct 19, 2012
Loading...

Share This Page