这是structs.xml中的配置信息:
<package name="orders" namespace="/orders" extends="struts-default">
<!-- 传递要修改订单信息Action -->
<action name="PassOrdersInfoAction" class="cn.edu.xmu.nextgentb.eclipse.action.PassOrdersInfoAction">
<result name="success">../modifyOrdersSumForm.jsp</result>
</action>
</package>
这是JSP页面:
<title>您可以修改订单总额</title>
</head>
<body>
<table>
<thead>
<tr>
<td>订单编号</td>
<td>顾客编号</td>
<td>订单状态</td>
<td>订单总额</td>
<td>可进行的操作</td>
</tr>
</thead>
<!-- 循环遍历查询结果,并显示 -->
<s:iterator value="resultList">
<tr>
<td><s:property value="orderId"/></td>
<td><s:property value="customerId"/></td>
<td><s:property value="date"/></td>
<td><s:property value="state"/></td>
<td><s:property value="sum"/></td>
<td>
<s:url id="modify" action="PassOrdersInfoAction">
<s:param name="ordersinfo.orderId"><s:property value="orderId"/></s:param>
<s:param name="ordersinfo.state"><s:property value="state"/></s:param>
<s:param name="ordersinfo.date"><s:property value="date"/></s:param>
<s:param name="ordersinfo.isVisibleForS"><s:property value="isVisibleForS"/></s:param>
<s:param name="ordersinfo.isVisibleForC"><s:property value="isVisibleForC"/></s:param>
<s:param name="ordersinfo.customerId"><s:property value="customerId"/></s:param>
<s:param name="ordersinfo.storeId"><s:property value="storeId"/></s:param>
<s:param name="ordersinfo.consigneeId"><s:property value="consigneeId"/></s:param>
<s:param name="ordersinfo.shipping"><s:property value="shipping"/></s:param>
<s:param name="ordersinfo.insurance"><s:property value="insurance"/></s:param>
<s:param name="ordersinfo.promocode"><s:property value="promocode"/></s:param>
<s:param name="ordersinfo.sum"><s:property value="sum"/></s:param>
</s:url>
<s:a href="%{modify}">修改订单总金额</s:a>
</td>
</tr>
</s:iterator>
</table>
这是PassOrdersInfoAction:
package cn.edu.xmu.nextgentb.eclipse.action;
import com.opensymphony.xwork2.ActionSupport;
import cn.edu.xmu.nextgentb.eclipse.vo.Orders;
public class PassOrdersInfoAction extends ActionSupport{
Orders orderinfo=new Orders();
public Orders getOrdersinfo() {
return orderinfo;
}
public void setOrdersinfo(Orders orderinfo) {
this.orderinfo = orderinfo;
}
public String execute()throws Exception{
System.out.println("run here");
return SUCCESS;
}
}
问题:无论我将<s:url id="modify" action="PassOrdersInfoAction">改成<s:url id="modify" action="PassOrdersInfoAction">还是<s:url id="modify" action="/orders/PassOrdersInfoAction"> 系统都提示【There is no Action mapped for namespace [/orders] and action name [PassOrdersInfoAction] associated with context path [/struts2].
There is no Action mapped for namespace [/orders] and action name [PassOrdersInfoAction] associated with context path [/struts2]. - [unknown location]】
请问这个问题如何处理
相关解决方案
- ssh action 调用service的时分service 为null
- Struts-config.xml配置文件《action-地图pings》元素的详解
- structs 项目eclipse 运行后tomcat出异常
- 关于<form action >的一个有关问题
- 新手求解,使用struts报错Cannot retrieve definition for form bean studsForm on action /stu,该怎么解决
- form 表单交付 <form action="<c:url value='desktop'/>"
- 生手求解,使用struts报错Cannot retrieve definition for form bean studsForm on action /stu
- 上面是JAVA WEB中,学生在线考试(action)的代码,有几个不明白,帮忙解释一上
- SSH有关问题,There is no Action 地图ped for action name null
- 有个有关问题,请各位帮忙看看:java.lang.ClassNotFoundException: org.apache.struts.action.Act
- 警告: Could not find action or result 什么原因?该如何解决
- strust2 No result defined for action and result input有关问题
- struts2 action 实施大概超过一分钟后 不执行跳转了
- Struts2.0和sping3.0结合 诡异错误Unable to instantiate Action
- :Unable to intantiate Action
- struts2 下传一段时间后报错No result defined for action and result input重启后便没有有关问题了
- description The requested resource (/gongqiu/goindex.action) is not available.解决方法
- function 施行 *action
- struts action 提交有关问题
- 關於javascript 呼叫 struts action 問題解决方法
- No result defined for action com.tes.web.action.FirstAction and result success,该怎么处理
- SSH框架中获取Action.action?submit=toList的类似完整路径解决思路
- <s:action>标签上传参数到action,该怎么解决
- struts2 action 执行时间过长 不执行跳转了,该怎么处理
- struts.xml里 <action name="">的有关问题,求指点迷惑
- form action 和 javascript 的提交問題解决方法
- <s:a href="aa.action!parentid=9"/> 是这么传参的吗
- 急在Struts2 action 中得到数据后,为某个字段截取字符串,怎么将该字段作为参数传到后台呢
- Struts2 的 Action 类里如何创建 session request response out 对象
- No result defined for action com.score.student.action.StudentAction and result i,该如何处理