What happens if I have two servlet mappings in web.xml that match a request?

Viewed 9019

What happens if I have two servlet mappings in web.xml that match a request? Does it choose most specific?

For example if I have the following xml and a request comes to ..../something while it go to somethingservlet or everything_else servlet?

   <servlet-mapping>
      <servlet-name>something</servlet-name>
      <url-pattern>/something</url-pattern>
  </servlet-mapping>    

  <servlet-mapping>
    <servlet-name>everything_else</servlet-name>
    <url-pattern>/*</url-pattern>
  </servlet-mapping>
1 Answers
Related