This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
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 Java Interview Guide this week in the Jobs Discussion 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!!!
I agree. Here's the link:
subject: Can I have multiple DispatcherServlet instantance.
It's not a secret anymore!