On Wed, 26 Feb 2014 06:57:27 -0300, garz <g...@gmx.net> wrote:

Hi,

Hi!

i was just curious about why Tapestry is using a Filter instead of a Servlet. Does anyone know?

As Lance said, a servlet is and endpoint and it must send a response to a request. This causes servlets to be useless when you're trying to handle more than one URL pattern but not all. A servlet filter is way more flexible. You can have Tapestry code, specifically HttpServletRequestFilter, which has a chance to run some logic for every request, being it actually handled by Tapestry or not. One nice example would be to control access to images (or any other URL) located in the webapp context. You can do that in Tapestry even if the files are served by the servlet container itself.

--
Thiago H. de Paula Figueiredo
Tapestry, Java and Hibernate consultant and developer
http://machina.com.br

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

Reply via email to