Re: Why is using Tapestry a Filter instead of a Servlet
On Wed, 26 Feb 2014 06:57:27 -0300, garz 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
Re: Why is using Tapestry a Filter instead of a Servlet
thank you, thats it :) On 26.02.2014, at 11:22, Lance Java wrote: > Well... You can have the Tapestry filter mapped to /* and it can play > nicely with other servlets. > > http://tapestry.apache.org/configuration#Configuration-ConfiguringIgnoredPaths - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Why is using Tapestry a Filter instead of a Servlet
Well... You can have the Tapestry filter mapped to /* and it can play nicely with other servlets. http://tapestry.apache.org/configuration#Configuration-ConfiguringIgnoredPaths
Re: Why is using Tapestry a Filter instead of a Servlet
yes i know that, but it does not answer my question. :) On 26.02.2014, at 11:09, Lance Java wrote: > A filter is passed a reference to the FilterChain which can ultimately pass > through to the servlet container's own url resolution (ie a resource in the > war). > > A servlet is an endpoint and must resolve the URL itself. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: Why is using Tapestry a Filter instead of a Servlet
A filter is passed a reference to the FilterChain which can ultimately pass through to the servlet container's own url resolution (ie a resource in the war). A servlet is an endpoint and must resolve the URL itself.
Why is using Tapestry a Filter instead of a Servlet
Hi, i was just curious about why Tapestry is using a Filter instead of a Servlet. Does anyone know? Regards garz - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org