0% found this document useful (0 votes)
78 views12 pages

Apache Struts: A.MANOJ KUMAR (08871A0508) Under The Guidence of K.Narahari (Asst - Professor, CSE Dept)

This document provides an overview of the Apache Struts framework and how to build a Struts application, including creating ActionForms to hold data from HTML forms, Action classes to control requests and responses, configuring struts-config.xml to map components, and using JSPs and tag libraries to build the views. Key aspects of Struts covered include its MVC architecture with the ActionServlet as controller, integrating components through loose coupling in the config file, and building each component type.

Uploaded by

Aravind Sagar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views12 pages

Apache Struts: A.MANOJ KUMAR (08871A0508) Under The Guidence of K.Narahari (Asst - Professor, CSE Dept)

This document provides an overview of the Apache Struts framework and how to build a Struts application, including creating ActionForms to hold data from HTML forms, Action classes to control requests and responses, configuring struts-config.xml to map components, and using JSPs and tag libraries to build the views. Key aspects of Struts covered include its MVC architecture with the ActionServlet as controller, integrating components through loose coupling in the config file, and building each component type.

Uploaded by

Aravind Sagar
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 12

PROGRESSIVE SEMINAR ON

APACHE STRUTS
BY

A.MANOJ KUMAR (08871A0508) UNDER THE GUIDENCE OF K.NARAHARI (Asst.Professor,CSE Dept)

Web Server:

-In order to process the requests we are using the server side programming like servlets and jsp.

Model 1 architecture (MVC architecture)

Controller
Form submit HTTP Event

Business Layer

Servlets
Create/Set property

Browser

Forward

Model JavaBeans

View
HTTP Response

JSP HTML Style sheets

Get property

Struts MVC architecture:


create

Controller Http Event ActionServlet

Action Form
dispatch Business Logic
Action

Business Layer

Browser

forward

StrutsConfig. xml forward

create/set

Resource Bundle

Model JavaBeans

Http Response

View JSP

get

How to build a Struts application?


Build the Model Components (ActionForm Class)

Build the Controller Components (Action Class)

Build the View Components (JSPs)

Create the struts-config file

Update the web.xml file

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.

Package is used org.apache.struts.action.ActionServlet

CREATE THE STRUTS-CONFIG.XML FILE


To allow for better reusability, all components in Struts are loosely coupled. To integrate the components you must create a config file (struts-config.xml)

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy