tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier ...@ice-sa.com>
Subject Re: setenv.sh - how to set system properties to values containing spaces
Date Wed, 10 Jun 2009 11:22:47 GMT
Bap wrote:
...
Looks very much like the problem from hell, where the number of extra 
quoting levels depends on the number of times this thing ends up being 
interpolated.

A suggestion, which involves modifying catalina.sh, but maybe with less 
nefarious effects if it ever gets replaced :

- modify catalina.sh such that, in each command-line executing Tomcat 
and in which $JAVA_OPTS is invoked, you add another $MY_JAVA_OPTS after 
the $JAVA_OPTS.
- then define MY_JAVA_OPTS in setenv.sh, with what you want as 
additional options, using only 1 level of additional quoting.

e.g.

     exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \

becomes

     exec "$_RUNJAVA" $JAVA_OPTS $MY_JAVA_OPTS $CATALINA_OPTS \

and in setenv.sh :

MY_JAVA_OPTS="-Dsomeparam=\"this and that\""
or
MY_JAVA_OPTS='-Dsomeparam="this and that"'


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message