I am listing down some of the important Struts2 interview questionswith answers to help you in interview.
- What is Struts2?
- What are the differences between Struts1 and Struts2 or how Struts2 is better than Struts1?
- What are Struts2 core components?
- What is interceptor in Struts2?
- Which design pattern is implemented by Struts2 interceptors?
- What are different ways to create Action classes in Struts2?
- Does Struts2 action and interceptors are thread safe?
- Which class is the Front Controller in Struts2?
- What are the benefits of Interceptors in Struts2?
- What is ValueStack and OGNL?
- Name some useful annotations introduced in Struts2?
- Provide some important Struts2 constants that you have used?
- What is the use of namespace in action mapping in Struts2?
- Which interceptor is responsible for mapping request parameters to action class Java Bean properties?
- Which interceptor is responsible for i18n support?
- What is the difference in using Action interface and ActionSupport class for our action classes, which one you would prefer?
- How can we get Servlet API Request, Response, HttpSession etc Objects in action classes?
- What is the use of execAndWait interceptor?
- What is the use of token interceptor in Struts2?
- How can we integrate log4j in Struts2 application?
- What are different Struts2 tags? How can we use them?
- What is Custom Type Converter in Struts2?
- How can we write our own interceptor and map it for action?
- What is life cycle of an interceptor?
- What is an interceptor stack?
- What is struts-default package and what are it’s benefits?
- What is the default suffix for Struts2 action URI and how can we change it?
- What is the default location of result pages and how can we change it?
- How can we upload files in Struts2 application?
- What are best practices to follow while developing Struts2 application?
- How can we handle exceptions thrown by application in Struts2?