SlideShare a Scribd company logo
Introduction to STRUTS
Presenter: Jyoti Kar, Mindfire Solutions
Presenter: Jyoti Kar, Mindfire Solutions
AGENDA
* Introduction to MVC
* What is MVC1 and MVC2
* Struts 1 (Use of MVC)
* Struts 2 Introduction
* Difference between Struts 1 and Struts 2
Presenter: Jyoti Kar, Mindfire Solutions
UNDERSTANDING MVC
* MVC is an architectural pattern.
* Separates application logic and presentation.
* Loose coupling of components.
* Adds flexibility to the development process.
* Components – Model , View and Controller.
Presenter: Jyoti Kar, Mindfire Solutions
ARCHITECTURE
Presenter: Jyoti Kar, Mindfire Solutions
MVC 1 ARCHITECTURE
* MVC1 associates the presentation logic with the
business logic.
* In MVC 1, controller and model,both are JSP.
* Doesn't support re usability of application
components.
Presenter: Jyoti Kar, Mindfire Solutions
MVC 2 ARCHITECTURE
* MVC 2 isolates the presentation logic from business
logic.
* In MVC 2 controller is servlet and model is java class.
* Supports re usability of application components.
Presenter: Jyoti Kar, Mindfire Solutions
WHAT IS STRUTS
* Struts is an open source Web application framework
developed as Apache Jakarta project.
* Model-View-Controller (MVC) framework.
* 3 Major Components in Struts
– Servlet controller (Controller)
– JSP or any other presentation technology (View)
– Application Business Logic in the form of
whatever suits the application (Model)
* Struts is focused on Controller
– Struts is Model and View independent.
Presenter: Jyoti Kar, Mindfire Solutions
STRUTS ARCHITECTURE
Presenter: Jyoti Kar, Mindfire Solutions
CONTROLLER COMPONENTS IN STRUTS
* ActionServlet (Provided by Struts)
– Process user requests.
– Determine what the user is trying to achieve
according to the request.
– Pull data from the model (if necessary) to be
given to the appropriate view, and select the
proper view to respond to the user.
* RequestProcessor (Provided by Struts)
– Determine the ActionMapping associated with
this path.
– Instantiate the ActionForm associated with the
mapping and place it into the appropriate scope.
Presenter: Jyoti Kar, Mindfire Solutions
– Populate the ActionForm associated with this
request, if any.
– Perform validation (if requested) on the
ActionForm associated with this request (if any) .
– Instantiate an instance of the Action class
specified by the ActionMapping and calls the
execute() method.
– Finally, the process method of the
RequestProcessor takes the ActionForward
returned by your Action class, and uses to select
the next resource (if any).
Presenter:Jyoti Kar, Mindfire Solutions
* Action
– Extend org.jakarta.struts.action.Action
– Process client request by calling other objects
(BusinessLogic beans) inside its execute()
Method.
– Returns an ActionForward object that identifies
where control should be forwarded.
Public ActionForward execute(ActionMapping mapping,
ActionForm form,HttpServletRequest Request,
HttpServletResponse response)throws Exception;
Presenter: Jyoti Kar, Mindfire Solutions
* Action Form Bean
– Extends Action Form class defined by Struts.
– Contains only property getter and property setter
methods for each field-no business logic.
– Provides standard validation mechanism.
* Action Mapping
– Action mapping is specified in struts-config.xml .
– Struts framework creates ActionMapping object
and passes it to Action object.
Presenter: Jyoti Kar, Mindfire Solutions
* struts-config.xml contains three important
elements used to describe actions:
– <form-beans>contains FormBean definitions
Including name and type (classname).
– <action-mapping> contains action definitions
Use an <action> element for each action defined.
– <global-forwards>contains your global forward
definitions.
Presenter: Jyoti Kar, Mindfire Solutions
<struts-config>
<!-- ========== Form Bean Definitions ================= -->
<form-beans>
<form-bean name = "submitForm"
type = "com.mindfire.SubmitForm"/>
</form-beans>
<!-- ========== Global Forward Definitions ============ -->
<global-forwards type="org.apache.struts.action.ActionForward">
<forward name="logon"
path="/logon.jsp" />
</global-forwards>
Presenter: Jyoti Kar, Mindfire Solutions
<!-- ========== Action Mapping Definitions ============ -->
<action-mappings>
<action
path = "/submit"
type="com.mindfire.SubmitAction"
name="submitForm"
input="/submit.jsp"
scope="request"
validate="true">
<forward name="success" path="/submit.jsp"/>
<forward name="failure" path="/failure.jsp"/>
</action>
</action-mappings>
</struts-config>
Presenter: Jyoti Kar, Mindfire Solutions
MODEL COMPONENTS IN STRUTS
* ActionForm Bean
– ActionFormBean can be regarded as a Model
component.
* SystemState Bean
– This is a conceptual term: Struts does not
provide any programming API.
* BusinessLogic Bean
– This is a conceptual term: Struts does not
provide any programming API.
Presenter: Jyoti Kar, Mindfire Solutions
VIEW COMPONENTS IN STRUTS
* JSP files
* Tag libraries
* Resource files for internationalization.
Presenter: Jyoti Kar, Mindfire Solutions
VIEW COMPONENTS IN STRUTS
* JSP files
* Tag libraries
* Resource files for internationalization.
Presenter: Jyoti Kar, Mindfire Solutions
STRUTS2 ARCHITECTURE
Presenter: Jyoti Kar, Mindfire Solutions
REQUEST LIFE CYCLE
* User sends a request to the server.
* The FilterDispatcher looks at the request and
then determines the appropriate Action.
* Configured interceptors functionality applies
such as validation, file upload etc.
* Selected action is executed to perform the
requested operation.
* Finally the result is prepared by the view and
returns the result to the user.
Presenter: Jyoti Kar, Mindfire Solutions
DIFFERENCE BETWEEN STRUTS1 & STRUTS2
* In Struts2 Action class is POJO.
* Struts2 actions are instantiated for each request.
* Struts2 Actions are independent of Servlet API .
* Action form is not required rather action
properties are used in Struts 2.
* Struts2 supports annotations.
Presenter: Jyoti Kar, Mindfire Solutions
Question and
Answer
Presenter: Jyoti Kar, Mindfire Solutions
Thank you
Ad

More Related Content

What's hot (20)

Declarative UIs with Jetpack Compose
Declarative UIs with Jetpack ComposeDeclarative UIs with Jetpack Compose
Declarative UIs with Jetpack Compose
Ramon Ribeiro Rabello
 
What is WebElement in Selenium | Web Elements & Element Locators | Edureka
What is WebElement in Selenium | Web Elements & Element Locators | EdurekaWhat is WebElement in Selenium | Web Elements & Element Locators | Edureka
What is WebElement in Selenium | Web Elements & Element Locators | Edureka
Edureka!
 
Android UI
Android UIAndroid UI
Android UI
nationalmobileapps
 
Constructor in Java - ITVoyagers
Constructor in Java - ITVoyagersConstructor in Java - ITVoyagers
Constructor in Java - ITVoyagers
ITVoyagers
 
VB Multiple Forms
VB Multiple FormsVB Multiple Forms
VB Multiple Forms
obrienduke
 
Introduction to Struts 1.3
Introduction to Struts 1.3Introduction to Struts 1.3
Introduction to Struts 1.3
Ilio Catallo
 
android activity
android activityandroid activity
android activity
Deepa Rani
 
Selenium WebDriver training
Selenium WebDriver trainingSelenium WebDriver training
Selenium WebDriver training
Vijay Krishnan Ramaswamy
 
Fragment
Fragment Fragment
Fragment
nationalmobileapps
 
Data Persistence in Android with Room Library
Data Persistence in Android with Room LibraryData Persistence in Android with Room Library
Data Persistence in Android with Room Library
Reinvently
 
The Singleton Pattern Presentation
The Singleton Pattern PresentationThe Singleton Pattern Presentation
The Singleton Pattern Presentation
JAINIK PATEL
 
Preliminary design of column
Preliminary design of columnPreliminary design of column
Preliminary design of column
ila vamsi krishna
 
Modern JS with ES6
Modern JS with ES6Modern JS with ES6
Modern JS with ES6
Kevin Langley Jr.
 
Web controls
Web controlsWeb controls
Web controls
Sarthak Varshney
 
Flyweight pattern
Flyweight patternFlyweight pattern
Flyweight pattern
Shakil Ahmed
 
Jetpack Compose a new way to implement UI on Android
Jetpack Compose a new way to implement UI on AndroidJetpack Compose a new way to implement UI on Android
Jetpack Compose a new way to implement UI on Android
Nelson Glauber Leal
 
Selenium
SeleniumSelenium
Selenium
Kalyan ch
 
JQuery UI
JQuery UIJQuery UI
JQuery UI
Gary Yeh
 
Struts Basics
Struts BasicsStruts Basics
Struts Basics
Harjinder Singh
 
CSharp Presentation
CSharp PresentationCSharp Presentation
CSharp Presentation
Vishwa Mohan
 
Declarative UIs with Jetpack Compose
Declarative UIs with Jetpack ComposeDeclarative UIs with Jetpack Compose
Declarative UIs with Jetpack Compose
Ramon Ribeiro Rabello
 
What is WebElement in Selenium | Web Elements & Element Locators | Edureka
What is WebElement in Selenium | Web Elements & Element Locators | EdurekaWhat is WebElement in Selenium | Web Elements & Element Locators | Edureka
What is WebElement in Selenium | Web Elements & Element Locators | Edureka
Edureka!
 
Constructor in Java - ITVoyagers
Constructor in Java - ITVoyagersConstructor in Java - ITVoyagers
Constructor in Java - ITVoyagers
ITVoyagers
 
VB Multiple Forms
VB Multiple FormsVB Multiple Forms
VB Multiple Forms
obrienduke
 
Introduction to Struts 1.3
Introduction to Struts 1.3Introduction to Struts 1.3
Introduction to Struts 1.3
Ilio Catallo
 
android activity
android activityandroid activity
android activity
Deepa Rani
 
Data Persistence in Android with Room Library
Data Persistence in Android with Room LibraryData Persistence in Android with Room Library
Data Persistence in Android with Room Library
Reinvently
 
The Singleton Pattern Presentation
The Singleton Pattern PresentationThe Singleton Pattern Presentation
The Singleton Pattern Presentation
JAINIK PATEL
 
Preliminary design of column
Preliminary design of columnPreliminary design of column
Preliminary design of column
ila vamsi krishna
 
Jetpack Compose a new way to implement UI on Android
Jetpack Compose a new way to implement UI on AndroidJetpack Compose a new way to implement UI on Android
Jetpack Compose a new way to implement UI on Android
Nelson Glauber Leal
 
CSharp Presentation
CSharp PresentationCSharp Presentation
CSharp Presentation
Vishwa Mohan
 

Viewers also liked (8)

Struts presentation
Struts presentationStruts presentation
Struts presentation
Nicolaescu Petru
 
Struts,Jsp,Servlet
Struts,Jsp,ServletStruts,Jsp,Servlet
Struts,Jsp,Servlet
dasguptahirak
 
Administración de riesgos en un proyecto software
Administración de riesgos en un proyecto softwareAdministración de riesgos en un proyecto software
Administración de riesgos en un proyecto software
Anna Vega
 
JSP
JSPJSP
JSP
vikram singh
 
PLANEACION DE PROYECTOS DE SOFTWARE
PLANEACION DE PROYECTOS DE SOFTWAREPLANEACION DE PROYECTOS DE SOFTWARE
PLANEACION DE PROYECTOS DE SOFTWARE
Alberto Zurita
 
Planeacion y elaboración de proyectos de software
Planeacion y elaboración de proyectos de softwarePlaneacion y elaboración de proyectos de software
Planeacion y elaboración de proyectos de software
Ttomas Carvajal
 
Planificación de proyectos de software
Planificación de proyectos de softwarePlanificación de proyectos de software
Planificación de proyectos de software
hrubenleiva21
 
Proyecto de software
Proyecto de softwareProyecto de software
Proyecto de software
monik1002
 
Administración de riesgos en un proyecto software
Administración de riesgos en un proyecto softwareAdministración de riesgos en un proyecto software
Administración de riesgos en un proyecto software
Anna Vega
 
PLANEACION DE PROYECTOS DE SOFTWARE
PLANEACION DE PROYECTOS DE SOFTWAREPLANEACION DE PROYECTOS DE SOFTWARE
PLANEACION DE PROYECTOS DE SOFTWARE
Alberto Zurita
 
Planeacion y elaboración de proyectos de software
Planeacion y elaboración de proyectos de softwarePlaneacion y elaboración de proyectos de software
Planeacion y elaboración de proyectos de software
Ttomas Carvajal
 
Planificación de proyectos de software
Planificación de proyectos de softwarePlanificación de proyectos de software
Planificación de proyectos de software
hrubenleiva21
 
Proyecto de software
Proyecto de softwareProyecto de software
Proyecto de software
monik1002
 
Ad

Similar to Introduction to struts (20)

important struts interview questions
important struts interview questionsimportant struts interview questions
important struts interview questions
surendray
 
Struts Intro
Struts IntroStruts Intro
Struts Intro
Syed Shahul
 
We sport architecture_implementation
We sport architecture_implementationWe sport architecture_implementation
We sport architecture_implementation
aurelianaur
 
Stepbystepguideforbuidlingsimplestrutsapp 090702025438-phpapp02
Stepbystepguideforbuidlingsimplestrutsapp 090702025438-phpapp02Stepbystepguideforbuidlingsimplestrutsapp 090702025438-phpapp02
Stepbystepguideforbuidlingsimplestrutsapp 090702025438-phpapp02
Rati Manandhar
 
Strut2-Spring-Hibernate
Strut2-Spring-HibernateStrut2-Spring-Hibernate
Strut2-Spring-Hibernate
Jay Shah
 
Project Description Of Incident Management System Developed by PRS (CRIS) , N...
Project Description Of Incident Management System Developed by PRS (CRIS) , N...Project Description Of Incident Management System Developed by PRS (CRIS) , N...
Project Description Of Incident Management System Developed by PRS (CRIS) , N...
varunsunny21
 
Struts tutorial
Struts tutorialStruts tutorial
Struts tutorial
OPENLANE
 
Angular Seminar-js
Angular Seminar-jsAngular Seminar-js
Angular Seminar-js
Mindfire Solutions
 
Juzu framework
Juzu frameworkJuzu framework
Juzu framework
Kien Nguyen
 
SenchaCon 2016: Handling Undo-Redo in Sencha Applications - Nickolay Platonov
SenchaCon 2016: Handling Undo-Redo in Sencha Applications - Nickolay PlatonovSenchaCon 2016: Handling Undo-Redo in Sencha Applications - Nickolay Platonov
SenchaCon 2016: Handling Undo-Redo in Sencha Applications - Nickolay Platonov
Sencha
 
JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...
JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...
JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...
JavaScripters Community
 
Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2
Matt Raible
 
Struts2 course chapter 1: Evolution of Web Applications
Struts2 course chapter 1: Evolution of Web ApplicationsStruts2 course chapter 1: Evolution of Web Applications
Struts2 course chapter 1: Evolution of Web Applications
JavaEE Trainers
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
Sagar Nakul
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
Sagar Nakul
 
Introduction to Struts
Introduction to StrutsIntroduction to Struts
Introduction to Struts
elliando dias
 
Jsf intro
Jsf introJsf intro
Jsf intro
vantinhkhuc
 
struts unit best pdf for struts java.pptx
struts unit best pdf for struts java.pptxstruts unit best pdf for struts java.pptx
struts unit best pdf for struts java.pptx
ozakamal8
 
struts unit best pdf for struts java.pptx
struts unit best pdf for struts java.pptxstruts unit best pdf for struts java.pptx
struts unit best pdf for struts java.pptx
ozakamal8
 
AngularJs-training
AngularJs-trainingAngularJs-training
AngularJs-training
Pratchaya Suputsopon
 
important struts interview questions
important struts interview questionsimportant struts interview questions
important struts interview questions
surendray
 
We sport architecture_implementation
We sport architecture_implementationWe sport architecture_implementation
We sport architecture_implementation
aurelianaur
 
Stepbystepguideforbuidlingsimplestrutsapp 090702025438-phpapp02
Stepbystepguideforbuidlingsimplestrutsapp 090702025438-phpapp02Stepbystepguideforbuidlingsimplestrutsapp 090702025438-phpapp02
Stepbystepguideforbuidlingsimplestrutsapp 090702025438-phpapp02
Rati Manandhar
 
Strut2-Spring-Hibernate
Strut2-Spring-HibernateStrut2-Spring-Hibernate
Strut2-Spring-Hibernate
Jay Shah
 
Project Description Of Incident Management System Developed by PRS (CRIS) , N...
Project Description Of Incident Management System Developed by PRS (CRIS) , N...Project Description Of Incident Management System Developed by PRS (CRIS) , N...
Project Description Of Incident Management System Developed by PRS (CRIS) , N...
varunsunny21
 
Struts tutorial
Struts tutorialStruts tutorial
Struts tutorial
OPENLANE
 
SenchaCon 2016: Handling Undo-Redo in Sencha Applications - Nickolay Platonov
SenchaCon 2016: Handling Undo-Redo in Sencha Applications - Nickolay PlatonovSenchaCon 2016: Handling Undo-Redo in Sencha Applications - Nickolay Platonov
SenchaCon 2016: Handling Undo-Redo in Sencha Applications - Nickolay Platonov
Sencha
 
JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...
JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...
JavaScripters Event Oct 22, 2016 · 2:00 PM: Common Mistakes made by Angular D...
JavaScripters Community
 
Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2Migrating from Struts 1 to Struts 2
Migrating from Struts 1 to Struts 2
Matt Raible
 
Struts2 course chapter 1: Evolution of Web Applications
Struts2 course chapter 1: Evolution of Web ApplicationsStruts2 course chapter 1: Evolution of Web Applications
Struts2 course chapter 1: Evolution of Web Applications
JavaEE Trainers
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
Sagar Nakul
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
Sagar Nakul
 
Introduction to Struts
Introduction to StrutsIntroduction to Struts
Introduction to Struts
elliando dias
 
struts unit best pdf for struts java.pptx
struts unit best pdf for struts java.pptxstruts unit best pdf for struts java.pptx
struts unit best pdf for struts java.pptx
ozakamal8
 
struts unit best pdf for struts java.pptx
struts unit best pdf for struts java.pptxstruts unit best pdf for struts java.pptx
struts unit best pdf for struts java.pptx
ozakamal8
 
Ad

More from Mindfire Solutions (20)

Physician Search and Review
Physician Search and ReviewPhysician Search and Review
Physician Search and Review
Mindfire Solutions
 
diet management app
diet management appdiet management app
diet management app
Mindfire Solutions
 
Business Technology Solution
Business Technology SolutionBusiness Technology Solution
Business Technology Solution
Mindfire Solutions
 
Remote Health Monitoring
Remote Health MonitoringRemote Health Monitoring
Remote Health Monitoring
Mindfire Solutions
 
Influencer Marketing Solution
Influencer Marketing SolutionInfluencer Marketing Solution
Influencer Marketing Solution
Mindfire Solutions
 
ELMAH
ELMAHELMAH
ELMAH
Mindfire Solutions
 
High Availability of Azure Applications
High Availability of Azure ApplicationsHigh Availability of Azure Applications
High Availability of Azure Applications
Mindfire Solutions
 
IOT Hands On
IOT Hands OnIOT Hands On
IOT Hands On
Mindfire Solutions
 
Glimpse of Loops Vs Set
Glimpse of Loops Vs SetGlimpse of Loops Vs Set
Glimpse of Loops Vs Set
Mindfire Solutions
 
Oracle Sql Developer-Getting Started
Oracle Sql Developer-Getting StartedOracle Sql Developer-Getting Started
Oracle Sql Developer-Getting Started
Mindfire Solutions
 
Adaptive Layout In iOS 8
Adaptive Layout In iOS 8Adaptive Layout In iOS 8
Adaptive Layout In iOS 8
Mindfire Solutions
 
Introduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/MacIntroduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/Mac
Mindfire Solutions
 
LINQPad - utility Tool
LINQPad - utility ToolLINQPad - utility Tool
LINQPad - utility Tool
Mindfire Solutions
 
Get started with watch kit development
Get started with watch kit developmentGet started with watch kit development
Get started with watch kit development
Mindfire Solutions
 
Swift vs Objective-C
Swift vs Objective-CSwift vs Objective-C
Swift vs Objective-C
Mindfire Solutions
 
Material Design in Android
Material Design in AndroidMaterial Design in Android
Material Design in Android
Mindfire Solutions
 
Introduction to OData
Introduction to ODataIntroduction to OData
Introduction to OData
Mindfire Solutions
 
Ext js Part 2- MVC
Ext js Part 2- MVCExt js Part 2- MVC
Ext js Part 2- MVC
Mindfire Solutions
 
ExtJs Basic Part-1
ExtJs Basic Part-1ExtJs Basic Part-1
ExtJs Basic Part-1
Mindfire Solutions
 
Spring Security Introduction
Spring Security IntroductionSpring Security Introduction
Spring Security Introduction
Mindfire Solutions
 

Recently uploaded (20)

Build With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdfBuild With AI - In Person Session Slides.pdf
Build With AI - In Person Session Slides.pdf
Google Developer Group - Harare
 
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Maarten Verwaest
 
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptxTop 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
mkubeusa
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Mike Mingos
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Cyntexa
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Agentic Automation - Delhi UiPath Community Meetup
Agentic Automation - Delhi UiPath Community MeetupAgentic Automation - Delhi UiPath Community Meetup
Agentic Automation - Delhi UiPath Community Meetup
Manoj Batra (1600 + Connections)
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier VroomAI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
UXPA Boston
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
IT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information TechnologyIT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information Technology
SHEHABALYAMANI
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Limecraft Webinar - 2025.3 release, featuring Content Delivery, Graphic Conte...
Maarten Verwaest
 
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptxTop 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
Top 5 Benefits of Using Molybdenum Rods in Industrial Applications.pptx
mkubeusa
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025Zilliz Cloud Monthly Technical Review: May 2025
Zilliz Cloud Monthly Technical Review: May 2025
Zilliz
 
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Optima Cyber - Maritime Cyber Security - MSSP Services - Manolis Sfakianakis ...
Mike Mingos
 
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
On-Device or Remote? On the Energy Efficiency of Fetching LLM-Generated Conte...
Ivano Malavolta
 
Slack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teamsSlack like a pro: strategies for 10x engineering teams
Slack like a pro: strategies for 10x engineering teams
Nacho Cougil
 
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Everything You Need to Know About Agentforce? (Put AI Agents to Work)
Cyntexa
 
fennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solutionfennec fox optimization algorithm for optimal solution
fennec fox optimization algorithm for optimal solution
shallal2
 
AI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of DocumentsAI Agents at Work: UiPath, Maestro & the Future of Documents
AI Agents at Work: UiPath, Maestro & the Future of Documents
UiPathCommunity
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier VroomAI x Accessibility UXPA by Stew Smith and Olivier Vroom
AI x Accessibility UXPA by Stew Smith and Olivier Vroom
UXPA Boston
 
Bepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firmBepents tech services - a premier cybersecurity consulting firm
Bepents tech services - a premier cybersecurity consulting firm
Benard76
 
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à GenèveUiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPath Automation Suite – Cas d'usage d'une NGO internationale basée à Genève
UiPathCommunity
 
Config 2025 presentation recap covering both days
Config 2025 presentation recap covering both daysConfig 2025 presentation recap covering both days
Config 2025 presentation recap covering both days
TrishAntoni1
 
IT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information TechnologyIT488 Wireless Sensor Networks_Information Technology
IT488 Wireless Sensor Networks_Information Technology
SHEHABALYAMANI
 
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent LasterAI 3-in-1: Agents, RAG, and Local Models - Brent Laster
AI 3-in-1: Agents, RAG, and Local Models - Brent Laster
All Things Open
 
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Integrating FME with Python: Tips, Demos, and Best Practices for Powerful Aut...
Safe Software
 

Introduction to struts

  • 1. Introduction to STRUTS Presenter: Jyoti Kar, Mindfire Solutions
  • 2. Presenter: Jyoti Kar, Mindfire Solutions AGENDA * Introduction to MVC * What is MVC1 and MVC2 * Struts 1 (Use of MVC) * Struts 2 Introduction * Difference between Struts 1 and Struts 2
  • 3. Presenter: Jyoti Kar, Mindfire Solutions UNDERSTANDING MVC * MVC is an architectural pattern. * Separates application logic and presentation. * Loose coupling of components. * Adds flexibility to the development process. * Components – Model , View and Controller.
  • 4. Presenter: Jyoti Kar, Mindfire Solutions ARCHITECTURE
  • 5. Presenter: Jyoti Kar, Mindfire Solutions MVC 1 ARCHITECTURE * MVC1 associates the presentation logic with the business logic. * In MVC 1, controller and model,both are JSP. * Doesn't support re usability of application components.
  • 6. Presenter: Jyoti Kar, Mindfire Solutions MVC 2 ARCHITECTURE * MVC 2 isolates the presentation logic from business logic. * In MVC 2 controller is servlet and model is java class. * Supports re usability of application components.
  • 7. Presenter: Jyoti Kar, Mindfire Solutions WHAT IS STRUTS * Struts is an open source Web application framework developed as Apache Jakarta project. * Model-View-Controller (MVC) framework. * 3 Major Components in Struts – Servlet controller (Controller) – JSP or any other presentation technology (View) – Application Business Logic in the form of whatever suits the application (Model) * Struts is focused on Controller – Struts is Model and View independent.
  • 8. Presenter: Jyoti Kar, Mindfire Solutions STRUTS ARCHITECTURE
  • 9. Presenter: Jyoti Kar, Mindfire Solutions CONTROLLER COMPONENTS IN STRUTS * ActionServlet (Provided by Struts) – Process user requests. – Determine what the user is trying to achieve according to the request. – Pull data from the model (if necessary) to be given to the appropriate view, and select the proper view to respond to the user. * RequestProcessor (Provided by Struts) – Determine the ActionMapping associated with this path. – Instantiate the ActionForm associated with the mapping and place it into the appropriate scope.
  • 10. Presenter: Jyoti Kar, Mindfire Solutions – Populate the ActionForm associated with this request, if any. – Perform validation (if requested) on the ActionForm associated with this request (if any) . – Instantiate an instance of the Action class specified by the ActionMapping and calls the execute() method. – Finally, the process method of the RequestProcessor takes the ActionForward returned by your Action class, and uses to select the next resource (if any).
  • 11. Presenter:Jyoti Kar, Mindfire Solutions * Action – Extend org.jakarta.struts.action.Action – Process client request by calling other objects (BusinessLogic beans) inside its execute() Method. – Returns an ActionForward object that identifies where control should be forwarded. Public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest Request, HttpServletResponse response)throws Exception;
  • 12. Presenter: Jyoti Kar, Mindfire Solutions * Action Form Bean – Extends Action Form class defined by Struts. – Contains only property getter and property setter methods for each field-no business logic. – Provides standard validation mechanism. * Action Mapping – Action mapping is specified in struts-config.xml . – Struts framework creates ActionMapping object and passes it to Action object.
  • 13. Presenter: Jyoti Kar, Mindfire Solutions * struts-config.xml contains three important elements used to describe actions: – <form-beans>contains FormBean definitions Including name and type (classname). – <action-mapping> contains action definitions Use an <action> element for each action defined. – <global-forwards>contains your global forward definitions.
  • 14. Presenter: Jyoti Kar, Mindfire Solutions <struts-config> <!-- ========== Form Bean Definitions ================= --> <form-beans> <form-bean name = "submitForm" type = "com.mindfire.SubmitForm"/> </form-beans> <!-- ========== Global Forward Definitions ============ --> <global-forwards type="org.apache.struts.action.ActionForward"> <forward name="logon" path="/logon.jsp" /> </global-forwards>
  • 15. Presenter: Jyoti Kar, Mindfire Solutions <!-- ========== Action Mapping Definitions ============ --> <action-mappings> <action path = "/submit" type="com.mindfire.SubmitAction" name="submitForm" input="/submit.jsp" scope="request" validate="true"> <forward name="success" path="/submit.jsp"/> <forward name="failure" path="/failure.jsp"/> </action> </action-mappings> </struts-config>
  • 16. Presenter: Jyoti Kar, Mindfire Solutions MODEL COMPONENTS IN STRUTS * ActionForm Bean – ActionFormBean can be regarded as a Model component. * SystemState Bean – This is a conceptual term: Struts does not provide any programming API. * BusinessLogic Bean – This is a conceptual term: Struts does not provide any programming API.
  • 17. Presenter: Jyoti Kar, Mindfire Solutions VIEW COMPONENTS IN STRUTS * JSP files * Tag libraries * Resource files for internationalization.
  • 18. Presenter: Jyoti Kar, Mindfire Solutions VIEW COMPONENTS IN STRUTS * JSP files * Tag libraries * Resource files for internationalization.
  • 19. Presenter: Jyoti Kar, Mindfire Solutions STRUTS2 ARCHITECTURE
  • 20. Presenter: Jyoti Kar, Mindfire Solutions REQUEST LIFE CYCLE * User sends a request to the server. * The FilterDispatcher looks at the request and then determines the appropriate Action. * Configured interceptors functionality applies such as validation, file upload etc. * Selected action is executed to perform the requested operation. * Finally the result is prepared by the view and returns the result to the user.
  • 21. Presenter: Jyoti Kar, Mindfire Solutions DIFFERENCE BETWEEN STRUTS1 & STRUTS2 * In Struts2 Action class is POJO. * Struts2 actions are instantiated for each request. * Struts2 Actions are independent of Servlet API . * Action form is not required rather action properties are used in Struts 2. * Struts2 supports annotations.
  • 22. Presenter: Jyoti Kar, Mindfire Solutions Question and Answer
  • 23. Presenter: Jyoti Kar, Mindfire Solutions Thank you
  翻译: