Servlets GlossaryS2C Home « Servlets Glossary
Glossary Term | Description |
---|---|
URL Mapping | URL mapping pattern matching. |
URL MappingTop
The 2.5 Servlet specification allows us to build URL patterns in four different ways as well as applying rules when we have multiple matches for a URL pattern.
Once a match is made, matching terminates and the request is processed.
Match Type | URL Pattern Rule | Example | Example Matches |
---|---|---|---|
Exact match | String that must begin with / | /aServlet | /aServlet |
Directory match | String that must begin with / and end with /* | /aServlet/* | /aServlet/one /aServlet/one/two /aServlet/one/two/somePage.html |
Extension match | String that must begin with * | *.html | /one.html /anything/two.html /anything/anything/three.html |
Default Match | String that must just be / | / | URLs that don't match with anything else |