This problem was left at the end of the previous blog. Next we will start to solve the problem. Refer:
Http://www2.roguewave.com/support/docs/leif/leif/html/bobcatug/7-3.html
Http://foxty.javaeye.com/blog/39332
Http://blog.chinaunix.net/u2/86974/showart_1776019.html
10.2 specification of Mappings
In the web application deployment descriptor, the following syntax is used to define mappings:
• A string beginning with a'/'character and ending with a'/* 'Postfix is used as a path
Mapping.
• A string beginning with a '*.' prefix is used as an extension mapping.
• All other strings are used as exact matches only
•
A string containing only the '/' character indicates that Servlet
Specified by the mapping becomes the "default" servlet of
Application.
For example,Web. xml
File forExamples
Context on the serverExample.com
Matches the pattern in<URL-pattern>/status/* </url-pattern>
As follows:
Http://example.com/examples/status/synopsis |
Matches |
Http://example.com/examples/status/complete? Date = today |
Matches |
Http://example.com/examples/status |
Matches |
Http://example.com/examples/server/status |
Does not match |
A context located at the path/Examples
On the server at example.com matches the pattern in<URL-pattern> *. Map </url-pattern>
As follows:
Http://example.com/examples/US/Oregon/Portland.map |
Matches |
Http://example.com/examples/US/Washington/Seattle.map |
Matches |
Http://example.com/examples/Paris.France.map |
Matches |
Http://example.com/examples/US/Oregon/Portland.MAP |
Does not match, the extension is uppercase |
http://example.com/examples/interface/description/mail.mapi |
does not match, the extension is mapi rather than Map |