Spring MVC 文档说,在一个 Web 应用程序中可以有多个 DispatcherServlet,每个 DispatcherServlet 都有一个单独的上下文。我想知道这在什么情况下会有用?另外,为什么要分离上下文?有人可以对此提供一些见解吗?
提前谢谢。
Spring MVC 文档说,在一个 Web 应用程序中可以有多个 DispatcherServlet,每个 DispatcherServlet 都有一个单独的上下文。我想知道这在什么情况下会有用?另外,为什么要分离上下文?有人可以对此提供一些见解吗?
提前谢谢。
Please follow this question.
Can I use Spring MVC and Spring WS in one single application?
This should answer your question.
Please follow another question
Spring - When should I consider loading another context in same JVM?
This should answer your second question.
Yea, Its possible to have several Dispatcher Servlet, Say for example in one of my project I m using Json, Ibatis and normal spring configuration. For each one I m using each dispatcher servlet. But the main dispatcher servlet would be one in which other two would be included. Its just for convinient.