日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

There is no Action mapped for namespace [/]

發布時間:2024/9/16 编程问答 45 豆豆
生活随笔 收集整理的這篇文章主要介紹了 There is no Action mapped for namespace [/] 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

使用struts2框架產生的問題:

index.jsp:

<%@?page?language="java"?contentType="text/html;?charset=UTF-8"%> <jsp:forward?page="/login/login.jsp"></jsp:forward>

login.jsp:

<%@?page?language="java"?pageEncoding="UTF-8"%> <%@?taglib?uri="/struts-tags"?prefix="s"?%> <script?type="text/javascript"> function?ini(){document.form1.loginName.focus(); } </script> <html><head><meta?http-equiv="Content-Language"?content="zh-cn"><meta?http-equiv="Content-Type"?content="text/html;?charset=UTF-8"><title></title><link?href="${pageContext.request.contextPath}/css/Style.css"?rel="stylesheet"?type="text/css"></head><body?onload="ini()"><table?width="100%"?height="100%"?border="0"?cellpadding="0"?cellspacing="0"><tr><td?align="center"><table?width="452"?height="290"?border="0"?cellpadding="0"?cellspacing="0"><tr><td?bgcolor="#FFFFFF"><table?width="452"?height="290"?border="0"?cellpadding="0"?cellspacing="0"><tr><td?height="74"><img?src="${pageContext.request.contextPath}/images/logintitle.gif"></td></tr><tr><td?align="center"?valign="bottom"?background="${pageContext.request.contextPath}/images/loginbg.gif"><s:form?id="form1"?name="form1"??action="LoginAction_home.do"?target="_parent"?method="post">????<table?border="0"?align="center"?cellpadding="2"?cellspacing="0"><tr?align="center"><td?height="30"?colspan="2"?style="border-bottom:?1px?dotted?#cccccc"><strong?style="font-size:?14px;">請登錄</strong></td></tr><tr><td?height="30"?nowrap><font?color="000F60"><strong>用戶名:</strong>?</font></td><td><s:textfield?name="loginName"?id="loginName"?class="text"?style="width:?160px;"/></td></tr><tr><td?height="30"?nowrap><strong><font?color="000F60">密碼:?</font>?</strong></td><td><s:password?name="loginPsw"?id="loginPsw"??class="text"?style="width:?160px;"/></td></tr><tr><td?height="30"?nowrap?colspan="2"><strong><s:fielderror/><font?color="red"></font>?</strong></td></tr><tr><td?height="30"></td><td><s:submit?type="button"?name="submit"?value="登錄"?class="buttoninput"></s:submit><s:reset?type="button"?name="reset"?value="取消"?class="buttoninput"></s:reset></td></tr></table></s:form><table?width="100%"?border="0"?cellspacing="0"?cellpadding="0"><tr><td?height="30"?align="center"></td></tr><tr><td?height="23"?align="center"></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body> </html>

這里所填寫的form表單?namespace="/login"action=" LoginAction_home.do",會造成的問題是:

  • There is no Action mapped for namespace [/] and action name [LoginAction_home] associated with context path [/itcast1109_project].

原因是因為".do",

解決辦法:方法一:把".do"去掉。

方法二:把namespace去掉,action改為"/login/LoginAction_home.do"

總結

以上是生活随笔為你收集整理的There is no Action mapped for namespace [/]的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。