> Let's refresh the issue :
> 
> A request comes into Tomcat for a URL "/xxxx". It comes in 
> either on port 80 or port 666. And you want it to be 
> processed by the webapp at "/myapp/xxxx".


No: If it comes in at port 80, nothing "different" is supposed to
happen. So /xxxx should do whatever /xxxx would always do.

Yes: If it comes in on 666, I want it to behave as if it called for
/myapp/xxxx

> So you need 2 Connectors :
> <Connector port="80"...>
> <Connector port="666" ..>
> Tomcat passes the request to the same <Host ..> anyway, which 
> has a top location for webapps, probably (tomcat-dir)/webapps/.
> Tomcat will try to match the "/xxxx" request to a webapp 
> located at (tomcat-dir)/webapps/xxxx.
> So you would need a webapp there, even if it is a dummy, just 
> so that you have a place to put your filter and its 
> (tomcat-dir)/webapps/xxxx/WEB-INF/web.xml
> configuration file, and its classes or jars.
> In that web.xml, you will tell Tomcat that "around" the dummy 
> webapp, there is a filter, and that it should handle all 
> request URLs starting with "/xxxx".
> What the filter does then is up to you.
> I think that urlrewrite would be able to re-direct this call 
> to the webapp at "/myapp/xxxx", just by a couple of 
> configuration lines.

That will NOT work then. 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).

M.

This message and attachment(s) are intended solely for use by the addressee and 
may contain information that is privileged, confidential or otherwise exempt 
from disclosure under applicable law.

If you are not the intended recipient or agent thereof responsible for 
delivering this message to the intended recipient, you are hereby notified that 
any dissemination, distribution or copying of this communication is strictly 
prohibited.

If you have received this communication in error, please notify the sender 
immediately by telephone and with a 'reply' message.

Thank you for your co-operation.



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

Reply via email to