Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Set JAAS Config File in Tomcat7

 
Thangavel Loganathan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Techies,

I am implementing JAAS with Tomcat7, I want set JAVA_OPTS=$JAVA_OPTS -Djava.security.auth.login.config==$CATALINA_BASE/conf/jaas.config.

Normally we can set this entry in catalina.bat file in Tomcat6 and other older version. I am struggling to set in Tomcat7 because this doesn't contains any bat file inside the bin directory.

Please help me on this. Thanks in advance.

Thanks,
----
Thangavel
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18094
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In Tomcat6 you could create a TOMCAT_HOME/bin/setenv.sh (or, for Windows, setenv.bat) and assign your JAVA_OPTS values there. I recommend this because it keeps you from having to modify the Tomcat control scripts.

I haven't checked lately, but I am fairly sure that this can still be done in Tomcat 7.
 
Thangavel Loganathan
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tim,

Thanks for your reply, I can create sh or bat file inside the bin folder, fine. How to configure that bat or sh file will be get called when the server starts up?

Please suggest me.

Thanks,

Thangavel L Nathan
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18094
48
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Tomcat startup should be testing to see if it is present and if it is, it will execute it automatically. Not only at startup, but also at shutdown.
 
Bill L Miller
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If Tomcat is setup using a Windows Service, the .BAT/.CMD files will not be called. To setup the parameters in a Windows service just run the .EXE Tomcat7w.exe found in the /bin directory. You will see a panel that allows you to add -D properties (and adjust memory and other common settings).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic