servlet mapping tag reference - novalexei/mod_servlet GitHub Wiki
#####<servlet-mapping>
This tag specifies a URL mapping for a servlet that has been defined with the <servlet> tag.
One or more servlet tags and servlet-mappings must exist for each servlet, to tell mod_servlet when to call the servlet.
Multiple servlet-mapping tags can be specified for a single <servlet>, providing different URL patterns. See the <url-pattern> tag for examples.
A servlet-mapping must not be defined in web.xml before the servlet entry.
There are two required elements:
- <servlet-name> - the servlet name, as specified in the <servlet-name> element of the <servlet> tag
- <url-pattern> - the mapping, eg: *.do
Example servlet and servlet-mapping configuration:
<servlet>
<servlet-name>My Servlet</servlet-name>
<servlet-factory>libmy.so:myServlet</servlet-factory>
</servlet>
<servlet-mapping>
<servlet-name>My Servlet</servlet-name>
<url-pattern>/some/path/*</url-pattern>
</servlet-mapping>