This week's book giveaways are in the Jython/Python and Object-Oriented programming forums.
We're giving away four copies each of Machine Learning for Business: Using Amazon SageMaker and Jupyter and Object Design Style Guide and have the authors on-line!
See this thread and this one for details.
Win a copy of Machine Learning for Business: Using Amazon SageMaker and JupyterE this week in the Jython/Python forum
or Object Design Style Guide in the Object-Oriented programming forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

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

 
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
 
Bartender
Posts: 1682
7
Android Mac OS X IntelliJ IDE Spring Linux
  • 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 Mac OS X IntelliJ IDE Spring Linux
  • 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

https://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
 
Oh, sure, you could do that. Or you could eat some pie. While reading this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!