What is the difference between / and /* in web.xml

124 Views Asked by At

I am seeing 2 different URL pattern in web.xml. May I know what kind of URL matches with this pattern. It would be great if anyone explain this with example.

<filter-mapping>
        <filter-name>samplewithstar</filter-name>
        <url-pattern>/*</url-pattern>
</filter-mapping>



<filter-mapping>
        <filter-name>samplewithoutstar</filter-name>
        <url-pattern>/</url-pattern>
</filter-mapping>
1

There are 1 best solutions below

0
On

When you give /* it will select all the html tags.