Overview of Struts2 Framework
There are many J2EE framework based Servlet and JSP. The Struts2 is an free Open Source web framework based on MVC design pattern. The latest stable version of Struts is Struts2. It is project of Apache and based on MVC2 architecture. It is combination of WebWork2 and Struts1. It is highly extensible and flexible framework for web application development.
The key features of Struts2 are Interceptors, Results, easy integration with other framework through plugins, data validations at client and server side, implementation of Inversion of Control (IoC), internationalization, and tiles integration etc. It is a web application framework with tools, and API for creating web application. It implements Front Controller (FC) approach like – Struts1 and String Web MVC framework.
Any framework provides some common techniques to design either a standalone application, web application or enterprise application.
- Configuration Files -
It contains the configuration information of an application and settings of the application. It is in XML format and properties file(Key-value). It is an external file which is read at run time. In Struts2 src\struts.xml, struts.properties and Resource bundled are configuration files.
- Front Controller (FC) -
All the request goes from client and response come from server through Front Controller. It receives the request and processes it based on framework API logic and forwards result to the client for presentation. No any resources are accessible directly without front controller even static pages. The Struts1 has servlet based front controller (ActionServlet) and Struts2 has filter based controller (FilterDispatcher).
- View – (Presentation Layer) -
It is user interface, though which user intracts with application. There are various expression languages are used to develop UI like- Java Server Pages(JSP), JSP Expression Language(JSP-EL),Java Server Tag Library(JSTL), Object Graph Navigational Language (OGNL), FreeMarker, Velocity etc
The Struts2 framework is derived from WebWork2 and combination of Struts1 and WebWork2.
- WebWork 2 -
The WebWork2 is an Open Source Framework for web application development. It is developed by OpenSymphony and release in Feb2004. It is based on WebWork and XWork framework. The webwork is fully based on MVC2 architecture and the set of features – Interceptors, Results and Dispatchers. The view page can be developed using JSP, OGNL, Velocity, JsperReport, XSLT and Freemarker. We can create own template page using JSP and Velocity.
|Comment by : akash||April 23rd, 2014|
|Comment : good work plz add important topics - hibernate ,spring|
|Comment by : kaka scola||March 19th, 2014|
|Comment : It is good|
|Comment by : Gulab Suryawanshi||November 22nd, 2013|
|Comment : Hi, please try to Add Servlet ,JSP and Hibernate Tutorials|