Peter Crowther wrote:
2009/11/24 Looijmans, Mike <mike.looijm...@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.

Thanks for pointing that out. ;-)


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.

I think so too. My personal doubt is still about how Tomcat would try map a request that comes in as "/xxxx", "xxxx" being variable and being NOT "myapp". Since it does not find a match with "/myapp", and since obviously there cannot be an infinity of "/webapps/xxxx" apps pre-configured, would it then pass it to the "default app" (/ROOT) ?
Because then, that's where the filter would need to be configured, no ?

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

Reply via email to