Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Apache Tomcat »

Re: Specify location of server.xml as a start up argument

Jim Goodspeed

2007-03-06

Replies:

You could put a case statement in the catalina.sh file where you change the
CATALINA_BASE directory based on user input:

echo "Enter the application you want to start "
read app

case "$app" in
app1)
export CATALINA_BASE=/usr/local/app1base
;;
app2)
export CATALINA_BASE=/usr/local/app2base
;;
default)
export CATALINA_BASE=/usr/local/tomcat/latest
esac


On 3/6/07, Anto Paul <antopaul.list@(protected):
>
> Hi dev team,
>
>   Any comments on this ?. It will be nice to run a different application
> by flipping server.xml.
>
> ---------- Forwarded message ----------
> From: Anto Paul <antopaul.list@(protected)>
> Date: Feb 13, 2007 1:04 PM
> Subject: Specify location of server.xml as a start up argument
> To: users@(protected)
>
> Hi,
>  I run Tomcat from inside Eclipse. I pass the start up parameters to boot
> strap class. I want to specify server.xml as an argument so I could switch
> between run configuration to run different applications rather than edit
> server.xml context element or have 2 tomcat installations. Is it possible
> ?.
> I know about using different catalina.base and I am looking for a simpler
> config.
>
>
> Regards,
> Anto Paul
>
©2008 junlu.com - Jax Systems, LLC, U.S.A.