• 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

Unmapped book-dispatcher-servlet.xml

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
i am new in j2ee.
i have a warning,is :

" Aug 16, 2015 1:52:45 PM org.springframework.web.servlet.DispatcherServlet initServletBean
INFO: FrameworkServlet 'book-dispatcher': initialization completed in 1078 ms
Aug 16, 2015 1:52:45 PM org.springframework.web.servlet.PageNotFound noHandlerFound
WARNING: No mapping found for HTTP request with URI [/] in DispatcherServlet with name 'book-dispatcher'
Aug 16, 2015 1:52:45 PM org.springframework.web.servlet.PageNotFound noHandlerFound "

web.xml


and book-dispatcher-servlet.xml


MyController


pom.xml


in runing in browser show :

HTTP Status 404 -

type Status report

message

description The requested resource is not available.
Apache Tomcat/7.0.62

i must to do for solution my problem???
thank you.
 
Bartender
Posts: 3648
16
Android Mac OS X Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks like your web.xml has extra stuff or in wrong places.

I would do the following:
Take out the <param-name>contextClass</param-name> in <servlet> <init-param>
take out the contextConfigLocation <context-param>

So at the end the servlet section should look like:


Also I'm not sure if you need all those servlet-mappings, doesn't one is enough pointing at "/"

And in the book-dispatcher-servlet.xml file, the prefix for ViewResolver should have been "/WEB-INF/pages", not "webapp...."

Hope this helps.
 
Ranch Hand
Posts: 734
7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee">;


You've to correct this line in web.xml, in any case. I leave it to yourself doing that unless you're not sure?
 
g tsuji
Ranch Hand
Posts: 734
7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Also

<context:component-scan base-package="com.springapp.mvc.Controller"/>


you probably mean

with MyController inside it. Those must be precise.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic