Struts2+jQuery AJAX

页面
var parms = "loginer.id="+userId+"&loginer.roleid="+roleid+"&loginer.groupid="+messaClassid+"&loginer.status="+status;
$.ajax({
type: "POST",
url: "/Gdss/bbs/updateUser.jspy",
data:   parms,
success: function(msg){ alert(msg ); }
});


struts.xml
<action name="updateUser" class="com.gdsssecurity.gdss.bbs.action.UserMgrAction" method="updateUser">
</action>

javal类
public String updateUser() throws IOException{
//业务处理
HttpServletResponse response = ServletActionContext.getResponse();
response.setContentType("text/html;charset=UTF-8");
response.getWriter().print("修改成功");
return NONE;
}

你可能感兴趣的:(jquery,Ajax,struts)