In web.xml, how can I use a filter on only specific Servlets?
===

I have a Tomcat server which contains servlets (all in the same package <code>com.example.servlet</code>), some servlets are for an Android application, and some are for a webapp accessed by web browser (these ones generate JPSs).

I added a filter to generate HTML in an UTF-8 encodage (so that you can see accents like é, à, ï in my forms...), like this :

    <filter-name>encodingfilter</filter-name>
        <filter-class>com.example.encodage.EncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>
    </filter>
    
	<filter-mapping>
        <filter-name>encodingfilter</filter-name>
        <url-pattern>/*</url-pattern>
    </filter-mapping>

So as you see my filter is mapping all the urls.

And let's say here are my servlets :

    <!-- Servlet for Android app -->
    <servlet>
        <servlet-name>servletforandroid</servlet-name>
        <servlet-class>com.example.servlet.AndroidServlet</servlet-class>
    </servlet>
  
    <servlet-mapping>
        <servlet-name>servletforandroid</servlet-name>
        <url-pattern>/servletforandroid</url-pattern>
    </servlet-mapping>

    <!--- Servlet for webapp -->
    <servlet>
        <servlet-name>servletforwebapp</servlet-name>
        <servlet-class>com.sib.servlets.WebAppServlet</servlet-class>
    </servlet>

    <servlet-mapping>
        <servlet-name>servletforwebapp</servlet-name>
        <url-pattern>/servletforwebapp</url-pattern>
    </servlet-mapping>

NB : I added also in jsp-config a way to encode all the JSP in UTF-8

But here what I would like to do :

 - For the android app : URLs like <code>android/servletforandroid</code>
 - For the webapp : URLs like <code>webapp/servletforwebapp</code>
 - Apply the filter for encoding in UTF-8 only for the servlets for webapp

Is it possible ? I don't know very much about web.xml, I know how to do simple servlets and simple mappings but I would like to understand better how it works.
