为了账号安全,请及时绑定邮箱和手机立即绑定

我在筛选带有URI的HTTP请求时找不到映射错误

我在筛选带有URI的HTTP请求时找不到映射错误

波斯汪 2021-05-07 14:27:56
我在筛选带有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 WorldError : Jul 08, 2018 2:28:36 PM org.springframework.web.servlet.PageNotFound noHandlerFoundWARNING: 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 :&nbsp;&nbsp;<input name="pwd"><br/><input type="submit" value="Login"></form></body></html>Undersrc/main/resourcescom.projectControll.javapackage com.project;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.RequestMapping;
查看完整描述

1 回答

?
神不在的星期二

TA贡献1963条经验 获得超6个赞

好像在你web.xml你没写


<context-param>

    <param-name>contextConfigLocation</param-name>

    <param-value>WEB-INF/project-servlet.xml</param-value>

</context-param>


查看完整回答
反对 回复 2021-05-19
  • 1 回答
  • 0 关注
  • 180 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信