tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Multiple development sites using different ports
Date Thu, 26 Jun 2008 21:10:23 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

dylanmac,

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
example,
| /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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkhkBb8ACgkQ9CaO5/Lv0PC7QgCdFxw0UsIe3DIsy/9wSkiQkMA9
7XQAniBUkf/xsh/P0XUGf9MdJV+aBDzD
=VH3v
-----END PGP SIGNATURE-----

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


Mime
View raw message