• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Multiple Server Mappings (Spring)

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
It looks like it's time for me to write you a reality check! Or maybe a tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic