• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Spring controller mapping

 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I've got this servlets.xml:




And these lines of code in web.xml:



Clicking on the link that should take me to that page (services/repository/marketSegmentModification.jsp) i get a 404 error. I should mention that the link is clicked from an applet which contains the following code:




If i put a jsp in the exact location, everything is ok.

So...what am i doing wrong?

Thanks
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK - I'm assuming that MarketSegmentModificationController extends MultiActionController because it's using methodNameResolver - so you're using Spring MVC as the view layer, right? But I don't see a DispatcherServlet set up in web.xml - even if you have application contexts loaded through ContextLoaderListener, you still need to set up a DispatcherServlet to act as a front controller for Spring MVC.
 
Nick Potter
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, true, forgot about that.

But i still get an error... it says that no mapping for that controller is found in DispatcherServlet.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post the error you received? It may be that you didn't create a "<dispatcherServletName>-servlet.xml" file - you still need to create one (or use the contextConfigLocation init-param to point to another).
 
Nick Potter
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nevermind. It was problem with the actual mapping of the controller. Thanks for the input.
 
You'll never get away with this you overconfident blob! The most you will ever get is this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic