struts 提交表单保存数据后清空表单数据查询

来源:互联网 发布:网络防御模型ppdr 编辑:程序博客网 时间:2024/05/16 14:41

</pre><p></p><p></p><p>     使用struts表单提交数据后绑定表单的页面组件会包里表单属性值。 如:<html:text property=“username”/>   如果想清空表单值,再提交保存完数据后,删除作用域内的属性值。</p><p>     如果是request:</p><p>   </p><pre name="code" class="java">  request.removeAttribute(mapping.getAttribute());

   如果是form在session里:


 

 request.getSession().removeAttribute(mapping.getAttribute())

0 0
原创粉丝点击