Spring MVC No mapping found in Dispatcher Servlet?

The path in the home page is relative and points to /jsp/browsefiles. Htm while the mapping in the xml is for /browsefiles.htm.

Up vote 0 down vote favorite share g+ share fb share tw.

I am jus starting to learn Spring mvc. I browsed through a lot of similar questions about the same problem, but am still not able to solve this error. Can someone please look into my code and let me know what am missing?

Web. Xml: myphotosharingapp org.springframework.web.servlet. DispatcherServlet 1 myphotosharingapp *.

Htm org.springframework.web.context. ContextLoaderListener contextConfigLocation /WEB-INF/myphotosharingapp-service. Xml jsp/index.

Jsp myphotosharingapp-servlet. Xml: browseFilesController /WEB-INF/jsp/ . Jsp browse myphotosharingapp-service.

Xml: home. Jsp Share Photos --%> Welcome View Albums Browse index. Jsp: Share Photos Welcome!

Home The index page loads fine and the Home page too. But on click of the Browse button on the home. Jsp, I just get an "HTTP STATUS 404" error.

Tomcat says "No mapping for /springmvc/jsp/browsefiles. Htm in Dispatcher Servlet with the name myphotosharingapp" Can someone please help? Java spring spring-mvc link|improve this question edited Nov 13 '11 at 4:47Dave Newton36.7k51639 asked Nov 13 '11 at 4:46meenakshi1.

The path in the home page is relative and points to /jsp/browsefiles. Htm while the mapping in the xml is for /browsefiles.htm. A solution would be to make the URL relative to base using the request.getContextPath() in the JSP or the JSP tag of Spring MVC.

Okay.. thanks.. – meenakshi Nov 13 '11 at 6:14.

Your configuration is to map /browsefiles. Htm but you are try to access it through /springmvc/jsp/browsefiles. Htm Do you really need to use SimpleUrlHandlerMapping?

If not, you should try Spring MVC and mapping by annotation. It is a lot easier. You only need two xml beans to configure you basic application.

Here is the best tutorial: blog.springsource.org/2011/01/04/green-b... I understand that this is not the answer but I think it is better to learn how to use Spring annotation. Since you are new, I think it's best to give you this advice in case you don't know.

Thanks gigadot. I will learn how to use annotation.. – meenakshi Nov 13 '11 at 6:13.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions