You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Markus Wiederkehr <ma...@gmail.com> on 2005/02/09 17:06:44 UTC

Servlet filter question

I'm trying to install the JTidy servlet filter for validating the
pages generated by my Tapestry application.

The filter works fine for HTML pages when I use <servlet-name> in the
filter mapping. Unfortunately I have some custom services that
generate binary content and I don't want the filter to be used for
these services. So I would like to restrict the filter mapping to the
URLs /app?service=direct* and /app?service=page*.

But I can't get it work...

Here is an example that works:
<url-pattern>/app</url-pattern>

But this doesn't: 
<url-pattern>/app?service=direct</url-pattern>

Any ideas?

Markus

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


Re: Servlet filter question

Posted by Matt Raible <li...@raibledesigns.com>.
This is an issue with the servlet spec where filter-mappings won't take 
queryStrings into account.  My suggestion would be to subclass the 
filter and examine the query string to decide if you should execute the 
filter or not.

Matt

On Feb 9, 2005, at 9:06 AM, Markus Wiederkehr wrote:

> I'm trying to install the JTidy servlet filter for validating the
> pages generated by my Tapestry application.
>
> The filter works fine for HTML pages when I use <servlet-name> in the
> filter mapping. Unfortunately I have some custom services that
> generate binary content and I don't want the filter to be used for
> these services. So I would like to restrict the filter mapping to the
> URLs /app?service=direct* and /app?service=page*.
>
> But I can't get it work...
>
> Here is an example that works:
> <url-pattern>/app</url-pattern>
>
> But this doesn't:
> <url-pattern>/app?service=direct</url-pattern>
>
> Any ideas?
>
> Markus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org