I want to define page url ended with /login under in tag....I have written it like,
<servlet-filter-mapping>
<servlet-filter-name>Ip-Filter</servlet-filter-name>
<url-pattern>web/guest/login</url-pattern>
<url-pattern>c/portal/login</url-pattern>
<url-pattern>/login</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</servlet-filter-mapping>
Can i write it with some pattern like */login or something ??
Just
<servlet-filter-mapping>
<servlet-filter-name>Ip-Filter</servlet-filter-name>
<url-pattern>/login</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</servlet-filter-mapping>
will match anything ending with login, and
<url-pattern>/login/*</url-pattern>
will match urls such as http://server/context/login/index.html and http://server/context/login as well.
some explanations here