| Author |
Spring controller mapping
|
Nick Potter
Ranch Hand
Joined: May 07, 2008
Posts: 126
|
|
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
|
 |
Nathan Pruett
Bartender
Joined: Oct 18, 2000
Posts: 4121
|
|
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.
|
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
|
 |
Nick Potter
Ranch Hand
Joined: May 07, 2008
Posts: 126
|
|
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
Joined: Oct 18, 2000
Posts: 4121
|
|
|
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
Joined: May 07, 2008
Posts: 126
|
|
|
Nevermind. It was problem with the actual mapping of the controller. Thanks for the input.
|
 |
 |
|
|
subject: Spring controller mapping
|
|
|