我在筛选带有URI的HTTP请求时找不到映射错误
我知道已经问过这个问题了,但是对于我的错误,即使我没有解决我的错误的问题,我也将其转给了我。
错误记录
Jul 08, 2018 4:30:51 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'project'
Jul 08, 2018 4:30:51 PM org.springframework.web.servlet.DispatcherServlet initServletBean
INFO: FrameworkServlet 'project': initialization started
Jul 08, 2018 4:30:51 PM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
INFO: Refreshing WebApplicationContext for namespace 'project-servlet': startup date [Sun Jul 08 16:30:51 IST 2018]; root of context hierarchy
Jul 08, 2018 4:30:51 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/project-servlet.xml]
Jul 08, 2018 4:30:52 PM org.springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler
INFO: Mapped URL path [/**] onto handler 'org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0'
Jul 08, 2018 4:30:52 PM org.springframework.web.servlet.DispatcherServlet initServletBean
INFO: FrameworkServlet 'project': initialization completed in 806 ms
当我单击index.jsp中的提交按钮时,我只是想显示Controller.java中的Hello World
Error :
Jul 08, 2018 2:28:36 PM org.springframework.web.servlet.PageNotFound noHandlerFound
WARNING: No mapping found for HTTP request with URI [/project/myMethod] in DispatcherServlet with name 'project'
Web Pages/index.jsp:
<html>
<body>
<form action="myMethod">
Username : <input name="un"><br/>
Password : <input name="pwd"><br/>
<input type="submit" value="Login">
</form>
</body>
</html>
Under
src/main/resources
com.project
Controll.java
package com.project;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
神不在的星期二
相关分类