InterviewSolution
Saved Bookmarks
| 1. |
What is the purpose of Before annotation? |
|
Answer» The Before annotation marks a action method that needs to be called before the main action method and the result was executed. Return value is ignored. public class Employee extends ActionSupport{ Before public void isAuthorized() throws AuthenticationException { // authorize request, throw exception if failed } public String execute() { // perform secure action return SUCCESS; }}
|
|