1.

What Is The Purpose Of @after Annotation?

Answer»

The @After annotation marks a action method that needs to be called after the main action method and the result was executed. Return value is ignored.

public class EMPLOYEE extends ActionSupport{

@After

public void isValid() throws ValidationException {

// validate MODEL object, THROW exception if failed

}

public String execute() {

// PERFORM secure action

return SUCCESS;

}

}

The @After annotation marks a action method that needs to be called after the main action method and the result was executed. Return value is ignored.

public class Employee extends ActionSupport{

@After

public void isValid() throws ValidationException {

// validate model object, throw exception if failed

}

public String execute() {

// perform secure action

return SUCCESS;

}

}



Discussion

No Comment Found