首先,前台代码如下:
<form method="post" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
其次后台Java代码中设置回调参数
Struts2Utils.getResponse().getWriter().write("{\"statusCode\":\"200\",\"message\":\"成功\",\"navTabId\":\"\",\"rel\":\"\",\"callbackType\":\"closeCurrent\",\"forwardUrl\":\"\",\"confirmMsg\":\"\"}");