1
1
/*
2
- * Copyright (c) 2017, 2021 Oracle and/or its affiliates and others.
2
+ * Copyright (c) 2017, 2023 Oracle and/or its affiliates and others.
3
3
* All rights reserved.
4
4
*
5
5
* This program and the accompanying materials are made available under the
71
71
* <td>DEFAULT</td>
72
72
* </tr>
73
73
* <tr>
74
+ * <td>"MyServlet/index.html"</td>
75
+ * <td>""</td>
76
+ * <td>/</td>
77
+ * <td>DEFAULT</td>
78
+ * </tr>
79
+ * <tr>
74
80
* <td>"/MyServlet"</td>
75
81
* <td>MyServlet</td>
76
82
* <td>/MyServlet</td>
77
83
* <td>EXACT</td>
78
84
* </tr>
79
85
* <tr>
86
+ * <td>"MyServlet/foo"</td>
87
+ * <td>""</td>
88
+ * <td>/</td>
89
+ * <td>DEFAULT</td>
90
+ * </tr>
91
+ * <tr>
80
92
* <td>"/foo.extension"</td>
81
93
* <td>foo</td>
82
94
* <td>*.extension</td>
83
95
* <td>EXTENSION</td>
84
96
* </tr>
85
97
* <tr>
98
+ * <td>"/bar/foo.extension"</td>
99
+ * <td>bar/foo</td>
100
+ * <td>*.extension</td>
101
+ * <td>EXTENSION</td>
102
+ * </tr>
103
+ * <tr>
86
104
* <td>"/path/foo"</td>
87
105
* <td>foo</td>
88
106
* <td>/path/*</td>
89
107
* <td>PATH</td>
90
108
* </tr>
109
+ * <tr>
110
+ * <td>"/path/foo/bar"</td>
111
+ * <td>foo/bar</td>
112
+ * <td>/path/*</td>
113
+ * <td>PATH</td>
114
+ * </tr>
91
115
*
92
116
* </table>
93
117
*
@@ -98,12 +122,10 @@ public interface HttpServletMapping {
98
122
/**
99
123
* <p>
100
124
* Return the portion of the URI path that caused this request to be matched. If the {@link #getMappingMatch} value is
101
- * {@code
102
- * CONTEXT_ROOT} or {@code DEFAULT}, this method must return the empty string. If the {@link #getMappingMatch} value is
103
- * {@code
104
- * EXACT}, this method must return the portion of the path that matched the servlet, omitting any leading slash. If the
105
- * {@link #getMappingMatch} value is {@code EXTENSION} or {@code PATH}, this method must return the value that matched
106
- * the '*'. See the class javadoc for examples.
125
+ * {@code CONTEXT_ROOT} or {@code DEFAULT}, this method must return the empty string. If the {@link #getMappingMatch}
126
+ * value is {@code EXACT}, this method must return the portion of the path that matched the servlet, omitting any
127
+ * leading slash. If the {@link #getMappingMatch} value is {@code EXTENSION} or {@code PATH}, this method must return
128
+ * the value that matched the '*' excluding any leading '/'. See the class javadoc for examples.
107
129
* </p>
108
130
*
109
131
* @return the match.
@@ -112,11 +134,8 @@ public interface HttpServletMapping {
112
134
113
135
/**
114
136
* <p>
115
- * Return the String representation for the {@code url-pattern} for this mapping. If the {@link #getMappingMatch} value
116
- * is {@code
117
- * CONTEXT_ROOT}, this method must return the empty string. If the {@link #getMappingMatch} value is {@code
118
- * EXTENSION}, this method must return the pattern, without any leading slash. Otherwise, this method returns the
119
- * pattern exactly as specified in the descriptor or Java configuration.
137
+ * Return the String representation for the {@code url-pattern} for this mapping. This method returns the pattern
138
+ * exactly as specified in the descriptor or Java configuration.
120
139
* </p>
121
140
*
122
141
* @return the String representation for the {@code url-pattern} for this mapping.
@@ -135,7 +154,7 @@ public interface HttpServletMapping {
135
154
136
155
/**
137
156
* <p>
138
- * Return the {@link MappingMatch} for this instance
157
+ * Return the {@link MappingMatch} for this instance.
139
158
* </p>
140
159
*
141
160
* @return the {@code MappingMatch} for this instance.
0 commit comments