File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple Server Mappings (Spring)

 
Elie Hirschman
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic