✔ STRUTS 2 CHAPTERS:-
1. Struts2 Overview
2. Struts2 Architecture
3. Struts2 Configuration Files
4. Action in Struts2
5. Action in Struts2 by using Pojo Class
6. Action in struts2 by Implementing Action Interface
7. Action in Struts2 by Extending Action Support Class
8. Struts2 Hello World Example
9. Multiple Configuration File in Struts2
10. OGNL in Struts2
11. Value Stack in Struts2
12. Interceptors in Struts2
13. Struts2 Execandwait Interceptor
14. Struts2 Custom Interceptor
15. Struts2 Result type
16. Struts2 Redirect result type
17. Struts2 Validation Framework
18. Struts2 Validation by Built in validators
19. Struts2 i18n
20. Struts2 Zero Configuration by convention approach
21. Struts2 Zero Configuration by annotation Approach
22. Dispatch Action Functionality in Struts2
23. Dynamic method invocation in Struts2
24. Struts2 UI Tags
25. Struts2 Control Tags
26. Struts2 Data Tags
27. Struts2 and tiles integration
28. Struts2 and Quartz2 Schedular
29. Struts2 Interview Questions and Answers
1. Struts2 Overview
2. Struts2 Architecture
3. Struts2 Configuration Files
4. Action in Struts2
5. Action in Struts2 by using Pojo Class
6. Action in struts2 by Implementing Action Interface
7. Action in Struts2 by Extending Action Support Class
8. Struts2 Hello World Example
9. Multiple Configuration File in Struts2
10. OGNL in Struts2
11. Value Stack in Struts2
12. Interceptors in Struts2
13. Struts2 Execandwait Interceptor
14. Struts2 Custom Interceptor
15. Struts2 Result type
16. Struts2 Redirect result type
17. Struts2 Validation Framework
18. Struts2 Validation by Built in validators
19. Struts2 i18n
20. Struts2 Zero Configuration by convention approach
21. Struts2 Zero Configuration by annotation Approach
22. Dispatch Action Functionality in Struts2
23. Dynamic method invocation in Struts2
24. Struts2 UI Tags
25. Struts2 Control Tags
26. Struts2 Data Tags
27. Struts2 and tiles integration
28. Struts2 and Quartz2 Schedular
29. Struts2 Interview Questions and Answers
Interceptors:
Interceptor is an object which is called at the pre processing and post processing of a request. These are same as the filters in the servlet.
Use of interceptors in struts 2.
- 1. Interceptors are used to perform some pre-processing task before the action is invoked.
- 2. Interceptors are used to perform some post-processing task after the action is invoked.
- 3. are used to perform operations like validation, internationalization etc
- 4. Interceptors can also be used to catch exceptions.
Commonly used default interceptors of struts 2.
- 1. alias: It allows same parameters to have different alias name across requests.
- 2. checkbox: It is used to manage the check boxes by adding the false value for unchecked checkboxes.
- 3. conversionError: It is used to add the conversion errors into the action’s field errors.
- 4. execAndWait: It is used to send the user to an intermediate waiting page while action is executed.
- 5. i18n: It is used to track the selected locale during a session. It provides the internationalization and localization facilities.
- 6. debugging: It provides debugging support to the developer.
- 7. exception: It provides the automatic exception handling facility by mapping the exception from an action to the result.
- 8. fileUpload: It provides the facility to upload files.
- 9. logger: It outputs the executed action name.
- 1o. validation: It provides the validation support.
Struts 2 logger interceptor example:
test.jsp
web.xml
struts.xml
Test.java
welcome.jsp
Output:
Click on Hello button.
No comments:
Post a Comment