1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
| @WebServlet({"/path/*", "*.ext"})
public class ServletMapping extends HttpServlet {
protected void doGet(HttpServletRequest request,
HttpServletResponse response)
throws IOException {
HttpServletMapping mapping = request.getHttpServletMapping();
String mapping = mapping.getMappingMatch().name();
String value = mapping.getMatchValue();
String pattern = mapping.getPattern();
String servletName = mapping.getServletName();
}
}
|