Showing posts with label Struts. Show all posts
Showing posts with label Struts. Show all posts

October 01, 2016

Struts Interview Questions and Answers..

What are the advantages of Struts?
  • Struts follow MVC framework. So the JSP, Java and Action classes are organized and easily maintainable.
  • Centralized File-Based Configuration. Struts values/mapping are represented in XML or property files. This loose coupling means that many changes can be made without modifying or recompiling Java code, and that wholesale changes can be made by editing a single file. This approach also lets Java and Web developers focus on their specific tasks (implementing business logic, presenting certain values to clients, etc.) without needing to know about the overall system layout.
  • Struts provides a set of custom JSP tags that let you easily output the properties of JavaBeans components.
  • Form Field Validation. Struts has a robust, extensible validator that can be used to uniformly validate your form fields. This validation can be performed on the server (in Java), or both on the server and on the client (in JavaScript).

June 10, 2014

Difference Between Struts 1.x And Struts 2.x

1). In Struts 1 it's mandatory to extend org.apache.struts.action.Action and implement execute() method which returns ActionForward and accept HttpServletRequest and HttpServletResponse.