JSP 与 ACTION 之间的跳转

<script language="javascript">
function delconfirm(url){
if(confirm("你确定要删除本条数据吗?主部门的用户也会被删除!")){
location.href(url);
}
}
</script>

这里是在JS中设置跳转
out.print("<script>alert('删除成功!');window.location.href='../ListAllDepartmentInfo.action?code="
+ code + "'; </script>");

[组织机构设置 ] - [ 部门管理 ] - [部门信息]-【新建部门】
public String DelDepartmenInfoById2() {
Integer id = Integer.parseInt(get("id").toString().trim());
Integer code = Integer.parseInt(get("code").toString().trim());
this.getmenu(code, this.getRequest());
if (this.ocs.DelDepartmenUserById(id)) {
out
.print("<script>alert('删除成功!');window.location.href='../ListAllDepartmentInfo.action?code="
+ code + "'; </script>");
}
return null;
}

原文地址:https://www.cnblogs.com/meimao5211/p/3168613.html