tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: How do you handle 'rewrite queries' ?
Date Wed, 05 Aug 2009 17:31:44 GMT
Hash: SHA1


On 8/5/2009 11:30 AM, Paul Taylor wrote:
> Thanks actually the default is not picking up the root case, I've got a
> simpler related issue by war get deployed as searchserver in webapps, is
> there a way I can leave it then and get it to pick up from root
> i.e
> http://localhost:8080?query=%22R.E.S%22&type=artist&fmt=xml
> instead of
> http://localhost:8080/searchserver?query=%22R.E.S%22&type=artist&fmt=xml

Deploying into the root context is easy: just name your WAR file
ROOT.war (case matters!) instead of searchserver.war.

You URL will have to be
http://localhost:8080/?query=%22R.E.S%22&type=artist&fmt=xml (note the
additional slash) because the host must be separated from the path by a

> and how do i get it maps to port 80 so this will work
> http://localhost/searchserver?query=%22R.E.S%22&type=artist&fmt=xml

If you are only using Tomcat (no web server out front), you have a few

1. Just change your <Connector> in conf/server.xml from port="8080"
   to port="80".
   - On UNIX, this requires Tomcat to run as root,
     which is highly discouraged. You can use jsvc to run as non-root
     and still bind to port 80
2. Write some firewall rules (will be specific to your fw) to route IP
packets from port 80 to port 8080. This is tedious, error-prone, and
confusing. :(

I highly recommend the use of jsvc on UNIX. You can find out more about
jsvc here:

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


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message