tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Crowther <peter.crowt...@melandra.com>
Subject Re: Redirecting a port to a webapp
Date Tue, 24 Nov 2009 08:34:39 GMT
2009/11/24 Looijmans, Mike <mike.looijmans@oce.com>
> Because the "xxxx" is a random word, not a
> constant, nor the name of a servlet. Think wikipedia, the request might
> be for /foo or /bar or whatever, and the servlet uses that word for its
> own purposes (it will look it up in the database and return something
> interesting).
>
Aha!  New information - thank you!  I don't think you'd previously
mentioned that the xxxx was dynamic, not static.

I'd expect urlrewrite should be able to handle this situation - as
would writing your own Filter if you want to learn about the
technology.  Urlrewrite's manual is remarkably clear; I suspect it
would save time overall.

If you install urlrewrite, I'd expect a urlrewrite rule similar to the
following to work (note: untested!)

<rule>
  <note>Redirect :666/anything to :80/myapp/anything</note>
  <condition name="port">666</condition>
  <from>^\(.*\)$</from>
  <to>/myapp/$1</to>
</rule>

That plus two connectors for the two ports should do it, I think.

- Peter

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


Mime
View raw message