Given the code fragment:
When the context root is requested http://host:port/context, how does the container resolve this mapping?
Given the code fragment:
When the context root is requested http://host:port/context, how does the container resolve this mapping?
The provided servlet mappings include conflicting URL patterns. The servlets 'secondServlet' and 'thirdServlet' are both mapped to the url-pattern '/', which is not permitted by the servlet specification. This leads to an IllegalArgumentException during the startup of the servlet container. Therefore, the container throws an error at startup due to the conflicting servlet mappings.
Correct answer is C and tested on eclipse : java.lang.IllegalArgumentException: The servlets named [secondServlet] and [thirdServlet] are both mapped to the url-pattern [/] which is not permitted
answer B is correct
Answer C