tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Johnny Kewl" <>
Subject Re: Creating a new Service
Date Sun, 03 Aug 2008 14:28:00 GMT

----- Original Message ----- 
From: "Robert Drescher" <>
To: <>
Sent: Sunday, August 03, 2008 12:27 PM
Subject: Creating a new Service

> Hello everyone in this list!
> This is my first post in the users-help, after successfully installing
> Tomcat5.5
> The default applications are running (in the /usr/share/tomcat5.5-webapps
> folder), but for testing my application, I'd like to move mine to a
> different location in the filesystem.
> Am I right in my assumption that for this, I will need to create a new
> service in the server.xml, apart from Catalina?
> My structure would look like this:
> /usr/share/myapp/              <-- my applications root, the equivalent to
> /usr/share/tomcat5.5-webapps
> /usr/share/myapp/webapp   <-- my applications webapp, the equivalent to
> /usr/share/tomcat5.5-webapps/ROOT
> in the end, i'd like requests going to http://localhost:1234 being mapped 
> to
> /usr/share/myapp/webapp, the same as requests going to
> http://localhost:8180being now mapped to
> /usr/share/tomcat5.5-webapps/ROOT
> Which configurations do I have to change? I've ben messing around with the
> server.xml and the configurations of my webapp for some time, with the
> result of getting return code 400
> Also, as soon as this is working, can I just remove the definition of
> catalina from the server.xml to deactivate all the standard applications?
> I'd be very happy to recieve some advice on this and maybe even example
> configuration files *wink*
> Robert

Hi Robert... you getting good advice in the other posts... and your question 
actually lands in the middle of many ways to approach this...
It hints at virtual hosting, it can be done with a docbase in a context... 
it can be done by messing with Catalina Home and Catalina Base in the 
scripts... its a no mans land kinda question ;)

Heres a suggestion...
TC installs easily from a ZIP... its drop and play...

So rather go for a strategy of


Because this way your test stuff is away from your production stuff... if 
you nuke TC with a bad app... no problem
And as TC changes... new versions... you are going to want to play with all 
the new stuff..

The only thing it that TC's must operate on diff ports... you set this in 
server.XML... ie

    <Connector port="8080"
    <Server port="8005" shutdown="SHUTDOWN">

Each TC must not be the same... but after that setting..... you'll be 
whizing along...


will let you UNDEPLOY applications that you dont want

if your production server is set at

    <Connector port="80"
    <Server port="8006" shutdown="SHUTDOWN">


will do the same thing....

So every port is a diff test system... otherwise an application in one is 
absolutely identical to another...

The only reason to start messing with Catalina BASE and Catalina Home in the 
scripts with the idea of having many WEBAPP locations and one bin (I feel) 
is when you have serious disk space problems... but TC is very small and its 
not worth the pain...

Then to get to your last question.... if you have to have a webapp operate 
outside of the default Tomcat/webapps... you can tell just that web app to 
operate outside using something called the context file... and setting the 

I think this setup will get you going and its easy.... later you can mess 
with docbase and virtual hosting and all the rest...
TC is very flexible... so I think try keep it simple... drop and play idea, 
which works on any OS and your customer will also understand it...
You dont want to get to the stage where you have so much script all over the 
machine, that you too afraid to install another TC...

TC is going to be the best thing you ever did.... its worth the learning 

Have fun...

The most powerful application server on earth.
The only real POJO Application Server.
See it in Action :

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message