用的是jQuery的ajax请求,请求action中的某个方法,但总是提示Could not find action or result.
请求的路径:
url : "/AssetsWeb/boc/financialfare/statistics/exportHtml";
提示的错误:
There is no Action mapped for namespace /boc/financialfare/statistics and action name [object Object]. - [unknown location];
struts配置文件:
<!-- 統計模組 -->
/ui/financialfare/budgetmonitoringcondition/budget_monitoring_condition_list.vm
struts中的方法:
public String exportHtml() throws Exception {
// ruleList = generateRules();
System.out.println("yyyyyyyyyyyyyyyyyyyyyyyyyyy");
System.out.println("yyyyyyyyyyyyyyyyyyyyyyyyyyy");
return SUCCESS;
}
请各位赐教~
可能是jquery出了问题。
你用firefox firebug 查看ajax请求路径就知道了,应该是url问题。
请求路径应该变成下面路径
/boc/financialfare/statistics/[object Object]
没有找到 SUCCESS 值对应的result
你检查是否有 SUCCESS 值的result
jquery 的 ajax请求路径好像要全路径...你试试
应该带上后缀吧!
/AssetsWeb/boc/financialfare/statistics/exportHtml[color=blue][b].action[/b][/color]
第一:你的url地址的请求可能是错误的要么是什么.action或者什么.do方式去提交。
第二:你的action中返回的是success,但是你在你的struts.xml中并没有去配置name="success"的返回结果。
[b]好好检查一下[/b]
namespace /boc/financialfare/statistics ?
检查一下namespace的配置哦
看错了,不好意思。。 :oops: