Note that root (/
) means the context root of your web application.
<url-pattern>/servlet</url-pattern>
Matches to a specific resource that maps directly to path servlet
under root(/)
<url-pattern>/servlet/*</url-pattern>
Matches to any resource under /servlet
.
<url-pattern>/*</url-pattern>
Matches to any resource under root(/
).
<url-pattern>*.do</url-pattern>
Matches to a specific file pattern i.e. that ends with .do
.