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.
An IDE is no substitute for an Intelligent Developer.
Joined: Jun 05, 2009
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?
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).
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com