✔ 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
Valuestack in struts2 pdf download.
In struts 2 ValueStack represents a stack that contains the references of application specific objects. When a request come an object of ValueStack is created first and after it object of Action, Model or any other java resources are created. The references of all these objects are maintained in ValueStack.
In struts 2 ValueStack represents a stack that contains the references of application specific objects. When a request come an object of ValueStack is created first and after it object of Action, Model or any other java resources are created. The references of all these objects are maintained in ValueStack.
Note: The objects in the ValueStack are available to the response on UI pages. ValueStack uses OGNL for this process.
Main parts of ValueStack:
- 1. Object Stack: It is used to contain the references of the Objects.
- 2. Context Map: It contains the maps like Request Parameters, Request Attributes, Session Attributes and Application Attributes.
Commonly used methods of ValueStack interface:
1. findValue(String expr):Find a value by evaluating the specified expression.
Syntax: public Object findValue(String expr)
2. findString(String expr):Find a string by evaluating the specified expression.
Syntax: public String findString(String expr)
3. peek(): It gives the object which is on the top of the stack and not remove it from the stack.
Syntax: public Object peek()
4. pop(): It gives the object which is on the top of the stack and remove it from the stack.
Synatx: public Object pop()
5. push(Object o):Put the specified object on the top of the stack.
Syntax: public void push(Object o)
6. set(String key, Object value):Sets an object on the stack with the specified key. It can retrieve using findValue(key).
Syntax: public void set(String key, Object value)
7. size(): It gives the no. of objects in the stack.
Syntax: public int size()
Example:
login.jsp
web.xml
struts.xml
Login.java
welcome.jsp
Output:
Enter username.
Click on Hello button.
No comments:
Post a Comment