struts2 异步提示修改密码成功 流的方式
public String delete() throws UnsupportedEncodingException {
simple = new SimpleCRUDImpl();
simple.doDelete(news.getId());
byte[] buff = null;
buff = "you delete news succeed".getBytes("utf-8");
resultStream = new ByteArrayInputStream(buff, 0, buff.length);
return SUCCESS;
}
xml 配置部分
<action name="batchdelete" type="stream">
<param name="contentType">text/plain</param>
<param name="inputName">resultStream</param>
</result>
<interceptor-ref name="defaultStack" />
<interceptor-ref name="access" />
</action>