URL Patterns
Servlets and filters need to be mapped onto URLs with the <url-pattern> element. The <url-pattern> contains a string with limited wildcard support. The following four types of pattern are supported:
| Description | Syntax | Examples |
|---|---|---|
| Simple path without wildcards | String starting with "/" | /filename , /dir1/dir2/filename , /dir1 |
| Directory | String starting with with "/", ending with "/*" | /dir1/* , /dir1/dir2/* |
| File extension | "*.extension" | *.html , *.jpg, *.do |
| Default servlet | Always "/" | / |

