• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Getting No Mapping found error message

 
Ranch Hand
Posts: 367
Eclipse IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Could you please tell me what is wrong with the following code :

This is the HelloController.class

Below is HelloWeb-servlet.xml :

Below is web.xml

This is hello.jsp in jsp folder


I get HTTP 404 error with the below message :

I tried out @RequestMapping("/") as well but getting the same error message.
Please advise.
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wouldn't the URL be

{{WARName}}/Hello

This is always the place where everyone gets confused. I still do after years and years.

If you deploy on Tomcat or an App Server it typically maps the URL to the war file name unless you set it somewhere else.

Then you have to add the Servlet mapping, which in your case is just "/"

Then you add the RequestMapping which you have at the class level and is set to "/Hello"

Which if the war was called "mark.war" the the URL would be

localhost:8080/mark/Hello

Mark
 
pramod talekar
Ranch Hand
Posts: 367
Eclipse IDE Opera Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Mark.
I'll get back to you soon.

Regards,
Pramod
 
reply
    Bookmark Topic Watch Topic
  • New Topic