1

Spring MVC documentation says that it is possible to have several DispatcherServlets in a Web application, each one would have a separate context. I wonder in which situation this would be useful? Also, why separated contexts? Could someone give some insight about this?

Thx in advance.

alderaan
  • 23
  • 1
  • 5

2 Answers2

0

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.

Community
  • 1
  • 1
Saurabh
  • 1,405
  • 1
  • 21
  • 42
  • Thank you for your response, that's what I needed, an example of a situation in which two or more DispatcherServlets are required. I was asking also, why has each dispatcher a separate spring context?. Maybe the explanation is obvious, but I don't see it. – alderaan Nov 12 '12 at 13:11
  • I mean, where is the need of having two separated contexts? – alderaan Nov 12 '12 at 15:14
  • @alderaan - i have updated answer. please have a look at it. Hope it solves your second problem as well. – Saurabh Nov 13 '12 at 05:19
0

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.

Harini
  • 105
  • 3
  • 13