STRUTS2报错合集(待添加)

来源:互联网 发布:iphone6s怎样设置网络 编辑:程序博客网 时间:2024/05/22 04:25

There is no Action mapped for namespace [/] and action name [1] associated with context path [/BidSystem]. - [unknown location]


最近做导出excel前台王后台传参一直报这个错 看网上的例子都说什么struts2文件没啦 什么什么的

在这里就记录下自己遇到的问题

这个问题是因为 window.location.href ="tenderexportAction?lineName="+$("#FullReport_LineType").val()+'&destinationCity='+$("#FullReport_DestinationCity").val();

这种传参方式不可以这么传,需要将里面的值装起来如var lineName="";
var lineType="";
var destinationCity="";
function ExportDB(){
lineName=$("#FullReport_LineName").val();
destinationCity=$("#FullReport_DestinationCity").val();
originCity=$("#FullReport_OriginCity").val();
然后这样加载  不然在往后台传参的时候无法识别$("#FullReport_DestinationCity").val();这玩意 

window.location.href ="tenderexportAction?lineName="+lineName+"&destinationCity="+destinationCity+"&originCity="+originCity

这是报这个错的一个原因 至于其他原因网上大把大把的

0 0