读书人

struts2 异步提醒修改密码成功 流的方

发布时间: 2012-09-20 09:36:50 作者: rapoo

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>

读书人网 >软件架构设计

热点推荐