File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Application Frameworks and the fly likes Can I have multiple DispatcherServlet instantance. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Can I have multiple DispatcherServlet instantance." Watch "Can I have multiple DispatcherServlet instantance." New topic

Can I have multiple DispatcherServlet instantance.

Peng Fan
Ranch Hand

Joined: May 04, 2004
Posts: 35
Hi all,

Can I configure multiple DispatcherServlet instance in a single web.xml, each DispacherServlet instance has their own bean configuration file, since I am going to setup several DispatcherServlet instance to handle request to different module, for eg,

and also I have two file under web-inf directory:moduleA-servlet.xml,moduleB-servlet.xml, the content of moduleA-servlet.xml includes following:

The problem is when I type following url into IE, I got a 404 error, and I debuged, found request even can't go into handleRequestInternal method:

Does any one can also tell me the relationship between applicationContext and webApplicationContext, can I share web related beans in applicationContext.xml, if I can, why I got a "can't find handler" when I move the aformentioned into applicationContext.xml from moduleA-servlet.xml.
Thank you very much indeed!!!
subject: Can I have multiple DispatcherServlet instantance.
Similar Threads
org.springframework.web.servlet.DispatcherServlet noHandlerFound
problem while loading the welcome page
Spring MVC question
Problems using displaytag + faces: + webflow: servlet conflict
Why do transactions not start when bean definitions are moved to <application>-servlet.xml?