-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim,

Jim Willeke wrote:
| I have moved a sever from port 9080 to using another tomcat instance
| (on port 80) and have renamed the sites.
|
| I want to intercept all the requests to the 9080 port and analyze the
| incoming URL and redirect to the new location(s).

You may have simpler alternatives:

1. Use your OS to forward port 9080 to port 80.
2. Run a second <Connector> on port 9080 on the same server.
~   No other configuration should be necessary.
3. If you are running a web server in front of Tomcat:
~   a. Use RedirectPermanent (the browser will do your work for you)
~   b. Listen on 9080 and use the same mappings to Tomcat
~   c. Use mod_rewrite or mod_proxy to proxy the traffic between ports

Also, when you say "redirect", do you really mean to respond to the
request with an HTTP 3xx response? Or, do you mean "make it go to the
right place"?

| I can write the servlet, but have not figured out how to force every
| incoming request to use the servlet.
| I never want a request to get a "Not found error"

If this is what you really want to do, you can always just map
everything to your one servlet:

<servlet-mapping>
~   <servlet-name>myRedirectorServlet</servlet-name>
~   <url-pattern>/*</url-pattern>
</servlet-mapping>

Note that you'll have to deploy this as the ROOT application if you want
to catch /everything/.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkfs/uIACgkQ9CaO5/Lv0PAz5ACfTCxXIkkbl0UpNGfUM/TCnTp6
Y28AmQEa7DQ4iOLkBoql5MYKOECk191i
=pUpt
-----END PGP SIGNATURE-----

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

Reply via email to