Professional Documents
Culture Documents
Apache Struts: A.MANOJ KUMAR (08871A0508) Under The Guidence of K.Narahari (Asst - Professor, CSE Dept)
Apache Struts: A.MANOJ KUMAR (08871A0508) Under The Guidence of K.Narahari (Asst - Professor, CSE Dept)
Apache Struts: A.MANOJ KUMAR (08871A0508) Under The Guidence of K.Narahari (Asst - Professor, CSE Dept)
APACHE STRUTS
BY
Web Server:
-In order to process the requests we are using the server side programming like servlets and jsp.
Controller
Form submit HTTP Event
Business Layer
Servlets
Create/Set property
Browser
Forward
Model JavaBeans
View
HTTP Response
Get property
Action Form
dispatch Business Logic
Action
Business Layer
Browser
forward
create/set
Resource Bundle
Model JavaBeans
Http Response
View JSP
get
Building an ActionForm:
The ActionForm (also called the form) is a data holder that contains the data entered trough an HTML form. The form should also contain the get & set methods for each property. The form may also implement a validate method to perform data entry validations before actually performing the requested action. To create a form, you will need to extend the class org.apache.struts.action.ActionForm
BUILDING AN ACTIONSERVLET
ActionServlet is used to control the request and send the appropriate response to that request. It transforms request parameters into ActionForm There is only one ActionServlet in the application.
Within this file youll define the action-mappings and form-beans. The action-mappings tell the ActionServlet which action classes to include within the application.
The form-beans define the ActionForm classes required within the application.
BUILDING A JSP
To create a JSP using Struts you will use the tag libraries provided by the Struts Framework. struts-logic.tld : This tag library contains tags that are useful in managing conditional generation of output text, looping over object collections for repetitive generation of output text, and application flow management. struts-html.tld : This taglib contains tags used to create struts input forms, as well as other tags generally useful in the creation of HTML-based user interfaces.
References:
1) Books: i) The complete reference struts, by James holms, 2nd Edition, TMH. ii) Struts: Kick start, by James turner, Kevin bedell, sams publishings. 2) Journals: i) Shu-qiang Huang, Huan-ming Zhang, Research on Improved MVC Design pattern Based on Struts and XSL, ISISE08 International symposium on information science and Engineering, 2008, ISBN: 978-1-4244-2727-4, pages: 451-455. 3) Websites: i)http://en.wikipedia.org/wiki/Java_struts ii)http://jakarta.apache.org/struts/
Thank you