My code is like this:
public class CustoTypeAction extends ActionSupport{
private ResultDto resultDto;
//setter & getter resultDto
}
Config:
<action name="listCustoType" method="listCustomerType" class="custoType">
<result name="success">listCustoType.jsp</result>
How can I set resultDto value to null from jsp on page load? What struts tag should I use?
As I understood you must implement
Preparableinterface. It executes beforeexecute()method.http://struts.apache.org/2.1.6/struts2-core/apidocs/com/opensymphony/xwork2/Preparable.html
If you want to show the object only once, and it must be gone after user reloads the page, you must use session. If file is snown already, you can change the value in session that it must not be shown on next reload.
You can see the example to work with session from here:
http://www.roseindia.net/struts/struts2/struts2-login.shtml