• 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

No mapping found for HTTP request with URI in Maven Project [duplicate]

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am new to maven and started a maven project integrating spring framework. I started a maven project and tried to print Hello World in a jsp page. But when I am running my project on Apache, always gets this warning with HTTP Status 404

WARNING: No mapping found for HTTP request with URI [/SampleMaven/] in DispatcherServlet with name 'dispatcher'

This is my pom.xml file



This is the controller



dispatcher-servlet.xml



I tried in many ways but couldn't able to solve this problem. Appreciate advice from experienced developers.
 
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try with the URL, http://<server-ip>:<server-port>/SampleMaven/student
 
Dinesh Madushanka
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes I tried using that pattern

http://localhost:8080/SampleMaven/student

But sever always generates that warning with http 404 error.
 
Prasad Krishnegowda
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
change your url-pattern for Spring DispatcherServlet in web.xml to /* from /
 
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
@op
Can you afford to comment out the listener element in your deployment descriptor? Without seeing the necessity there in this case, it would work fine without. The springframework's ContextLoaderListener seems to cause some confusing trouble in the deployment... After deleting that part, the deployment should go fine and with the url like http://localhost:<port#>/SampleMaven/, you should get the anticipated response if everything else is good.
 
I think I'll just lie down here for a second. And ponder this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic