(I corrected the subject: s/52/53/ )
On 09/01/2013 00:54, Shing Wai Chan wrote:
> I am looking at http://java.net/jira/browse/SERVLET_SPEC-53
> Clarify expected behaviour if multiple servlets are mapped to the same
> URL pattern
>
> I plan to add a new paragraph at the end of 12.2 as follows:
> If two different serlvets mapped to the same URL pattern, there should
> be a failure in deployment time.
>
> Please let me know if you have any concern.
Given the Javadoc for ServletRegistration#addMapping(String...) which
states:
<quote>
If any of the specified URL patterns are already mapped to a different
Servlet, no updates will be performed.
</quote>
I'd say something along the following lines to ensure that we don't
contradict that.
"If - after merging information from fragments and annotations - the
effective web.xml contains any url-patterns that are mapped to multiple
servlets then the deployment must fail".
Mark