亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

jsp表單提交數據老是報錯:404,求正解

jsp表單提交數據老是報錯:404,求正解

WentworthPeach 2018-03-29 17:40:52
jsp部分:<form?action="onsend"?method="post"> ???????? ????????MessageText:<textarea?name="message">${time?}</textarea> ???????? ????????<input?type="submit"?value="提交"?/> ????</form> ???? ?controller部分:?@RequestMapping(value="/onsend",method=RequestMethod.POST) ????public?ModelAndView?producer(@RequestParam("message")?String?message)?{ ????????System.out.println("------------send?to?jms"); ????????ModelAndView?mv?=?new?ModelAndView(); ????????producer.sendMessage(demoQueueDestination,?message); ????????mv.setViewName("welcome"); ????????return?mv; ????} ????配置文件:web.xml ????<?xml?version="1.0"?encoding="UTF-8"?> <web-app?xmlns="http://java.sun.com/xml/ns/javaee"?? ??????????xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"?? ??????????xsi:schemaLocation="http://java.sun.com/xml/ns/javaee? ??????????http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" ??????????version="3.0"> ??<display-name>Archetype?Created?Web?Application</display-name> ?? ??<!--?加載spring的配置文件,例如hibernate、jms等集成?--> ??<context-param>?? ??????<param-name>contextConfigLocation</param-name>?? ??????<param-value> ??????????classpath:spring-root.xml; ?????????classpath:activemq.xml; ?????</param-value>?? ??</context-param> ?? ??<listener> ??????<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> ??</listener> ?? ??<servlet> ????????<servlet-name>springMVC</servlet-name> ????????<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> ????????<init-param> ????????????<param-name>contextConfigLocation</param-name> ????????????<param-value>classpath:spring-mvc-dispatch.xml</param-value> ????????</init-param> ????????<load-on-startup>1</load-on-startup> ????</servlet> ????<servlet-mapping> ????????<servlet-name>springMVC</servlet-name> ????????<url-pattern>/</url-pattern> ????</servlet-mapping> ???????<!--?處理編碼格式?--> ????<filter>?? ????????<filter-name>characterEncodingFilter</filter-name>?? ????????<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>?? ????????<init-param>?? ????????????<param-name>encoding</param-name>?? ????????????<param-value>UTF-8</param-value>?? ????????</init-param>?? ????????<init-param>?? ????????????<param-name>forceEncoding</param-name>?? ????????????<param-value>true</param-value>?? ????????</init-param>?? ????</filter>?? ????<filter-mapping>?? ????????<filter-name>characterEncodingFilter</filter-name>?? ????????<url-pattern>/*</url-pattern>?? ????</filter-mapping> </web-app>
查看完整描述

3 回答

?
weixin_慕數據3229144

TA貢獻1條經驗 獲得超0個贊

請問解決了嗎???我現在也遇到這種問題??

查看完整回答
反對 回復 2020-05-31
?
WentworthPeach

TA貢獻9條經驗 獲得超0個贊

求大佬幫忙啊

查看完整回答
反對 回復 2018-03-30
?
大咪

TA貢獻785條經驗 獲得超332個贊

producer這個方法上面沒有路徑了嗎?比如類上?

查看完整回答
反對 回復 2018-03-29
點擊展開后面12
  • 3 回答
  • 0 關注
  • 2378 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號