• 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 MVC With No XML Configuration "no mapping found error".

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, i'm new in Spring + MVC.
i've found a script and i could run some part of this script.
this script configuring spring mvc with no xml, inside java side.
i put all the jars into WEB-INF/lib.

ControllerConfiguration .java



MyWebAppInitializer.java



MyController.java





MovieController.java





Film.java



i have two questions:
1. if i write "http://localhost:8080/SpringMVC/", the page displays.
But if i write "http://localhost:8080/SpringMVC/movies/index" i get this warning:

"WARNING: No mapping found for HTTP request with URI [/SpringMVC/WEB-INF/views/index.jsp] in DispatcherServlet with name 'spring'"


2. if i add a JSP page(Giris.jsp) under WebContent, i cannot display this page. must all page has a mapping? how can i display simple jsp page?

WARNING: No mapping found for HTTP request with URI [/SpringMVC/Giris.jsp] in DispatcherServlet with name 'spring'



Regards.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You have added following dispatcher servlet here below.

It intercepts requests to your jsp as well because of the '/*' mapping. You can do following to fix it.


And access each request using .do extension. One more thing don't try to send index as view name as its default component of server.

 
Our first order of business must be 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