tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: Multiple development sites using different ports
Date Thu, 26 Jun 2008 21:10:23 GMT
Hash: SHA1


dylanmac wrote:
| The reason this matters to me is because I like running my sites as
| root-relative.  That way I can reference images, files, etc as, for
| /images/logo.png rather than having to traverse the directory
structure via
| "../".  This makes the site much more portable and accurately reflects how
| the site will run in production anyway (where most sites run as root).

You would be better off using paths that are relative to the context
root. There are many tools that will do this form you in JSPs or
whatever template language you may be using to generate content.

| So can anyone give me a quick primer on how to configure Tomcat to use
| multiple ports for root-relative development?  I have spent several hours
| researching this with no luck.

Check out the RUNNING.txt file that ships with Tomcat. Read the
"Advanced Configuration - Multiple Tomcat Instances" section; it should
help a lot.

The only thing you have to remember to do is to set the ports for each
instance's <Connector> elements and make sure you don't get confused.

I have this exact same setup in dev, test, demo, and prod (with the
addition of Apache httpd and mod_jk, too), so I should be able to answer
any questions you have.

- -chris
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla -


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

View raw message