Как исключить действие отправки из списка параметров в struts2?
я пытаюсь исключить действие отправки из списка параметров. Ниже приведен класс действий.
@Namespace("/admin_side")
@ResultPath("/WEB-INF/content")
@InterceptorRefs({
@InterceptorRef(value="validation", params={"excludeMethods", "test"}),
@InterceptorRef(value="params", params={"excludeParams", "action:postAction"})})
public final class TestAction extends ActionSupport implements Serializable, ValidationAware
{
private static final long serialVersionUID = 1L;
private static final String SUCCESS = "success";
private String name;
@Action(value = "test", results = {
@Result(name="success", location="Test.jsp"),
@Result(name = "input", location = "Test.jsp")})
public String test() throws Exception
{
System.out.println("name = "+name);
return SUCCESS;
}
@Action(value = "postAction", results = {
@Result(name="success", location="Test.jsp"),
@Result(name = "input", location = "Test.jsp")})
public String postAction()
{
System.out.println("Post invoked");
System.out.println("name = "+name);
return SUCCESS;
}
@RequiredStringValidator(type= ValidatorType.FIELD, message = "The name is required.")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public void validate()
{
if(!hasErrors()&&name.length()