1

I have followed the tutorial found here to the T. And I get the error a 404 error. In eclipse the error shows as:

Aug 25, 2011 9:22:06 PM org.springframework.web.servlet.DispatcherServlet
noHandlerFound
WARNING: No mapping found for HTTP request with URI [/til/] in DispatcherServlet
with name 'appServlet'

In eclipse the project is titled 'til'

I am using tomcat 7. Could this be an issue with tomcat?

trashgod
  • 203,806
  • 29
  • 246
  • 1,045
mfrancis107
  • 1,401
  • 1
  • 13
  • 21
  • I highly doubt it's an issue with Tomcat. We can look at the tutorial all day, but when it comes down to it, we need to see your code. Anything else would be nothing more than a guess. – Jeremy Aug 26 '11 at 01:46
  • And on that note, here is a guess :) I think you are trying to access a resource by using /til/ in the URL...however, if you are following the tutorial to the T, then you should access it something like http://host:port/views/home.jsp. Again, this is just a guess. – legendofawesomeness Aug 26 '11 at 01:51
  • @Nitin: Sorry, but no ;-) The tutorial eventually allows you to get a page saying `Hello World` with this URL: `http://localhost:8080/baremvc` Also, the JSP file is stored in WEB-INF which is not supposed to be accessible by HTTP. – Jeremy Aug 26 '11 at 01:54
  • Even that does not have /til/ in the URL..I just gave an example.basic thing is that the URL should not have /til/ in it :) – legendofawesomeness Aug 26 '11 at 01:56
  • 1
    Please post your configuration files. It appears that the /til/ url does not have a mapping with-in the DispatcherServlet. Need more info please :) – chrislovecnm Aug 26 '11 at 04:27
  • This is a common duplicate: http://stackoverflow.com/questions/2977446/tiles-2-and-no-mapping-found-for-http-request-with-uri-spring-mvc http://stackoverflow.com/questions/3489224/no-mapping-found-for-http-request-with-uri-app-j-spring-security-login-in-disp http://stackoverflow.com/questions/6645941/no-mapping-found-for-http-request-with-uri – Michael Aug 26 '11 at 08:24

1 Answers1

2

Your web-application is correctly getting the request based on the warning that you have shown - I think in your case you have defined the web context as "/" for your application, so that the request to http://localhost:port/til is actually being interpreted as a request for a controller with a requestmapping with a value of "/til". Try request just to the root context http://localhost:port/ and see if it works out.

Biju Kunjummen
  • 49,138
  • 14
  • 112
  • 125