aspose file tools*
The moose likes Spring and the fly likes Getting No Mapping found error message Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Getting No Mapping found error message" Watch "Getting No Mapping found error message" New topic
Author

Getting No Mapping found error message

pramod talekar
Ranch Hand

Joined: Apr 26, 2010
Posts: 323

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.


Thanks,
Pramod
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

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


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
pramod talekar
Ranch Hand

Joined: Apr 26, 2010
Posts: 323

Thanks Mark.
I'll get back to you soon.

Regards,
Pramod
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting No Mapping found error message