Depends. I'm assuming you have a session form bean, in Struts 1 (but I have no way of knowing because you didn't TellTheDetails). If that's the case, you can just set the form values to their defaults in the action. Or just don't use a session bean.
gokul subramanian
Greenhorn
Joined: Apr 06, 2010
Posts: 8
posted
0
i am using struts2 and i found that to initialize the fields load prepare interceptors is to be used. But when i trying this it always printing the null value
*After* executing the action? That would make no sense: prepare() prepares the action to be executed.
It'd be easier if you just posted the code and explained the problem better.
gokul subramanian
Greenhorn
Joined: Apr 06, 2010
Posts: 8
posted
0
i have used interceptors as follows
<action name="xx" method="xx" class="xx">
<result name="xx">/xx.jsp</result>
<interceptors-ref="prepare"/>
</action
and implemented the prepare in action as follows
public class xx extends ActionSupport implements Preparable {
I understand how the interceptor and preparable works. I'm asking what you're actually trying to *do*, because it makes no sense to want to call an action method after the action runs--after the action runs and the response is returned the action no longer exists: they're instantiated per-request.