0
我已經遇到了一些現有的代碼,其中web.xml中的單個servlet被多次映射。我不明白這樣做的必要性。在web.xml中多次映射單個servlet
例如
<servlet>
<servlet-name>test1</servlet-name>
<servlet-class>
com.test.spring.MyDispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>test2</servlet-name>
<servlet-class>
com.test.spring.MyDispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>test3</servlet-name>
<servlet-class>
com.test.spring.MyDispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>