my action file is:
package action;
import com.opensymphony.xwork2.ActionSupport;
public class SampleAction extends ActionSupport{
private static final long serialVersionUID = 1L;
public void validate()
{
System.out.println("validate() method called");
}
public
String populate()
{
System.out.println("populate() method called");
return "populate";
}
public String execute()
{
System.out.println("execute() method called");
return SUCCESS;
}
}
in struts.xml:
<action name="*Sample" method="{1}" class="action.SampleAction">
<interceptor-ref name="defaultStack">
<param name="validation.excludeMethods">populate</param>
</interceptor-ref>
<result name="populate">/first.jsp</result>
<result name="success">/success.jsp</result>
</action>
i think the output must be:
populate() method called
validate() method called
execute() method called
but it gave
validate() method called
populate() method called
validate() method called
execute() method called
i am trying to to validate only during execution of exclude() method.
------ need help ------
thnx in advance