Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

No mapping found for HTTP request with URI - Why won't my page load?

 
Ray Clark
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am new to Spring and I can't get the configuration right so that my page comes up. I bet that it is a simple configuration problem but I have exhausted myself with internet searches, reading through and trying examples, reading and rereading the 2 Spring books that I have and still no luck. I am hoping that someone can point out my configuration problem.

Thank you, here is my code:



I appreciate it if someone can suggest what is wrong with my configuration.

Thanks,
Ray
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try changing


to
 
Ray Clark
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the reply. I read some of the tips for new posters like myself and I see that I posted way too much code. I apologize.

Ok, I changed the servlet mapping in the web.xml to be / instead of *.htm as suggested and the URL /DVDTracker5-0/searchMainView.htm still gets:

No mapping found for HTTP request with URI [/DVDTracker5-0/searchMainView.htm] in DispatcherServlet with name 'dispatcher'|#]

The controller has @RequestMapping("/searchMainView.htm") so I don't understand why the dipatcher servlet doesn't know which controller to send the request to.

Ray
 
Bill Gorder
Bartender
Posts: 1682
7
Android IntelliJ IDE Linux Mac OS X Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read some of the tips for new posters like myself and I see that I posted way too much code. I apologize.


No need to be sorry, I think you posted just the right amount of code. Most everything you posted was relevant to figuring out the issue.

You are missing



in your dispatcher-servlet.xml. This is different from <tx:annotation-driven /> and comes out of a different namespace. There is a thread floating around here somewhere from a few weeks back explaining what it does..

Here you go

http://www.coderanch.com/t/586286/Spring/mvc-annotation-driven-Vs-context


Welcome to Java Ranch btw !
 
Ray Clark
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That did it. Thanks a bunch for your help.

Ray
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic