[Solved] org.springframework.web.servlet.PageNotFound noHandlerFound Warning: No mapping found for HTTP request w

Error:

Org.springframework.web.servlet.pagenotfound nohandlerfound warning: no mapping found for HTTP request with URI

Reason:

1. The corresponding control layer package is com.hillsoft.controller, which is written in spring-mvc.xml as & lt; context:component-scan base-package= “com.hillsoft.*.controller”> , The middle * No, it should be com.hillsoft.controller

If the control layer package is similar to com.hillsoft.system manage.controller and there are multiple system manage in the middle, then com.hillsoft. *. Controller can be used

2. Configure the URL pattern intercepted by spring MVC in web.xml, preferably in the control layer, such as & lt; url-pattern>*. action</ url-pattern> Or *. Do, add @ request mapping (“/ login”) to the controller class method, then login.action can be used in the requested place, such as the action of the form

Similar Posts: