aspose file tools*
The moose likes Other Application Frameworks and the fly likes Multiple Server Mappings (Spring) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Multiple Server Mappings (Spring)" Watch "Multiple Server Mappings (Spring)" New topic
Author

Multiple Server Mappings (Spring)

Elie Hirschman
Ranch Hand

Joined: Dec 15, 2005
Posts: 37
I have 2 different servlets that I would like to load (from 2 different xml files). As such, I tried to configure my web.xml like this:

and I had a props-admin-servlet.xml file and props-loms-servlet.xml file to match. Each of these configured URL mappings (and also pointed to separate Tiles definitions files, but maybe skip over that for now). But when I run the webapp, it always seems to want to point to the admin definitions, and so it cannot find the view I am looking for in loms.
Is there something I am missing that I would need to tweak in order to load 2 servlet-mappings? I tried switching the load-on-startup orders as well, but no go.
Elie Hirschman
Ranch Hand

Joined: Dec 15, 2005
Posts: 37
If I can't do this, I would at least like to know how I can set up multiple view Resolvers, so that some can go thru Tiles and some can go directly to jsps with no Tiles definitions. Hope somebody knows.
Elie Hirschman
Ranch Hand

Joined: Dec 15, 2005
Posts: 37
I wasn't able to accomplish this- any time I tried it, Spring would always try to interpret it as a Tiles view.
Instead, I was able to forward to a JSP by tacking on a special Spring directive:


placing redirect: before the jsp name did the trick, as illustrated in http://www.springframework.org/docs/reference/mvc.html#d0e10025
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple Server Mappings (Spring)
 
Similar Threads
[SOLVED] images fail to load in spring2.5/tiles2
Spring MVC read again applicationContext.xml?
Spring new bie problem
Error: spring-servlet.xml
Can I have multiple DispatcherServlet instantance.