This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Tomcat and the fly likes CATALINA_OPTS in server.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "CATALINA_OPTS in server.xml" Watch "CATALINA_OPTS in server.xml" New topic

CATALINA_OPTS in server.xml

Sahiti Verma

Joined: Jan 23, 2012
Posts: 1

Can I specify CATALINA_OPTS in my server.xml rather than the startup script ?

Sahiti V
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15662

Welcome to the JavaRanch, Sahiti!

I wouldn't. I'm not sure how easy it would be in any event, since server.xml is an XML file digested by Tomcat, not a general-purpose script.

However, if you create a file in the TOMCAT bin directory named "" (Unix/Linux) or "setenv.bat" (Windows), you can assign environment variables in that file and the catalina script will use them.

The file format is the same as any other script file that sets environment variable values.

Customer surveys are for companies who didn't pay proper attention to begin with.
Consider Paul's rocket mass heater.
subject: CATALINA_OPTS in server.xml
Similar Threads
Tomcat6 on ubuntu - memory problem
heap space setting for Tomcat on Linux
JMX with Tomcat
Problem in printing a pdf file using pdfrenderer
Tomcat 4.x memory