Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > JAAS config file

Reply
Thread Tools

JAAS config file

 
 
Marius Hintermann
Guest
Posts: n/a
 
      07-03-2003
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
 
Reply With Quote
 
 
 
 
Ian DaBodewijk
Guest
Posts: n/a
 
      07-23-2003
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 <(E-Mail Removed)> wrote in message news:<bebq9l$lbp$(E-Mail Removed)>...
> I use to put the JAAS config file in WEB-INF/classes, and on logging i
> use this :
>
> URL configURL =
> this.getClass().getClassLoader().getResource("logi n.config");
> System.setProperty("java.security.auth.login.confi g",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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dll config and web.config and Label Expressions (binding label text to dll config settings) CSharpner ASP .Net 0 04-09-2007 09:00 PM
JAAS: Cisco TACACS+ LoginModule blinky Cisco 0 03-03-2005 03:41 AM
JAAS and user specific access to external system functionality davout Java 0 10-25-2003 07:33 AM
Newbie question on JAAS and LDAP davout Java 0 10-24-2003 05:24 PM
JAAS question... Joel Beach Java 1 09-19-2003 02:57 AM



Advertisments