• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Set JAAS Config File in Tomcat7

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Saloon Keeper
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
Posts: 27808
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
That new kid is a freak. Show him this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic