$.ajax({ type:"post", url:form.action, data:{ descId:descId, notShow:1 }, success:function(){ form.action = nextUrl; form.submit(); } });
jquery提交的data。在struts2中可以用属性的方式
private String notShow;
private String descId;
,
也可以用获得参数的方式
notShow = req.getParameter("notShow");
descId = req.getParameter("descId");
。之前都是用的属性的方式,今天试了下参数的方式,OK的