Could someone elaborate further these 2 specifications:
2. The container will recursively try to match the longest path-prefix. This is done by stepping down the path tree a directory at a time, using the / character as a path separator. The longest match determines the servlet selected.
Supposing your mapping is as follows: <servlet-name>servlet3</servlet-name> <url-pattern>/catalog</url-pattern>
And your URL is /catalog/index.html
Does recursively means the following:
1. Try to match /catalog/index.html. Not found! 2. Step down the path tree which will give you /catalog. Try to match - Found!
A string beginning with a / character and ending with a /* suffix is used for path mapping.
Question: Suppose you have a mapping of /foo/bar/*, is the string used for path mapping only includes those characters inside the / and /*, i.e. only foo/bar is used in this example?