A PRESENTATION ON STRUTS & HIBERNATE
The struts 2 framework is used to develop MVC-based web application.
The struts framework was initially created by Craig McClanahan and donated to Apache Foundation in May, 2000 and Struts 1.0 was released in June 2001.
The current stable release of Struts2 is 2.3.15.1 GA in July 16, 2013. [1]
1. A PRESENTATION ON
STRUTS & HIBERNATE
TUSHAR CHOUDHARY
B.TECH COMPUTER SCIENCE 4TH YEAR
GOVT. ENGG. COLLEGE BIKANER
1
2. What is Struts ?
The struts 2 framework is used to develop MVC-based web application.
The struts framework was initially created by Craig McClanahan and donated
to Apache Foundation in May, 2000 and Struts 1.0 was released in June 2001.
The current stable release of Struts2 is 2.3.15.1 GA in July 16, 2013. [1]
Struts 2 Framework
Struts 2 are the combination of web work framework of opensymphony and
struts 1.
struts2 = webwork + struts1
2
3. Struts2 Features
Struts 2 provide many features that were not in struts 1. The important features of struts 2
framework are as follows: [2]
Configurable MVC components
POJO based actions
AJAX support
Integration support
Various Result Types
Various Tag support
Theme and Template support
3
4. Struts 2 Architecture
The Model-View-Controller pattern in Struts2 is realized with following five core
components: [2]
Actions
Interceptors
Value Stack / OGNL
Results / Result types
View technologies
4
6. Advantage of Model 2 (MVC) Architecture
Navigation control is centralized.
Easy to maintain
Easy to extend
Easy to test
Better separation of concerns [3]
6
7. Steps to create Struts 2 Application
Create the directory structure
Create input page (index.jsp)
Provide the entry of Controller in (web.xml) file
Create the action class (Product.java)
Map the request with the action in (struts.xml) file and define the view components
Create view components (welcome.jsp)
load the jar files
start server and deploy the project [3]
7
11. What is Hibernate?
Hibernate Framework
This hibernate was started in 2001 by Gavin King as an alternative to EJB2 style entity
bean. The stable release of Hibernate till July 16, 2014, is hibernate 4.3.6.
It simplifies the development of java application to interact with the database. Hibernate
is an open source, lightweight, ORM (Object Relational Mapping) tool.
An ORM tool simplifies the data creation, data manipulation and data access. It is a
programming technique that maps the object to the data stored in the database. [5]
11
16. Steps to create Hibernate Application
Create the hibernate application without IDE. we need to follow following steps:
Create the Persistent class
Create the mapping file for Persistent class
Create the Configuration file
Create the class that retrieves or stores the persistent object
Load the jar file
Run the hibernate application without IDE [6]
16