• 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

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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic