SlideShare une entreprise Scribd logo
1  sur  10
Implementation ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Model – View – Controller
Struts ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Struts – continued ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Struts – general Architecture ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Page 1 Controller Action2 .java Struts- config. xml Mappings Business Logic Layer Data Layer View Layer Business Bean 1 Jsp Engine Jsp 1 Action3 .java Action4 .java Action1 .java Business Bean 2 Business Bean 3 Jsp 2 Jsp 3 Form Bean 1 Form Bean 2 Other Bean 1 request/session Web Browser MarkVision Server ,[object Object],[object Object],[object Object],[object Object],Jsp 2 Web Server Jsp 2 CoreSession CoreSession Socket
Example ,[object Object],[object Object],[object Object],[object Object]
creates / reuses index.htm Controller Show Logging Action .java Mappings Business Logic Layer Data Layer View Layer Jsp Engine LoggingBean.java logging.jsp Logging Form request/session Web Browser Granite Request: ShowLogging.do creates form bean in correct scope perform(mapping, form, request, response) calls business logic rule to get logging info returns forward(success) mainpulates data setCategoryList(list) forwards – logging.jsp expands custom tags response sent to browser – pure html ServerBean.java logging.jsp displays internationalized messages Web Server looks up <!-- Show logging --> <action path =&quot;/ShowLogging&quot; type =&quot;beans.ShowLoggingAction&quot; name =&quot;LoggingForm&quot;> < forward  name=&quot;success“ path=&quot;/logging.jsp&quot; /> </action> populates form values <form name=&quot;LoggingForm&quot;  …> <logic:iterate id=&quot;category“ name=&quot;LoggingForm&quot; property=&quot;categoryList&quot;> <bean:write name=&quot;category&quot; property=&quot;key&quot;/> <bean:write name=&quot;category&quot; property=&quot;desc&quot;/> … . </logic:iterate> </form> Messages Resources
creates / reuses action instance logging.jsp Controller Show Logging Action .java Mappings Business Logic Layer Data Layer View Layer Jsp Engine LoggingBean.java results.jsp Logging Form request/session Web Browser Granite form submit – action=‘SaveLogging.do’ reuses form bean in correct scope calls perform(mapping, form, request, response) getCategoryList() returns mapping.findForward(&quot;success&quot;) forwards – result.jsp expands custom tags Displays internationalized messages from bean response sent to browser – pure html ServerBean.java Messages Bean add result messages For each one that user has changed… call business logic to change on server browser adds form variables to request results.jsp Web Server looks up <!-- Save logging --> <action path =&quot;/SaveLogging&quot; type =&quot;beans.SaveLoggingAction&quot; name =&quot;LoggingForm&quot;> < forward  name=&quot;success“ path=&quot;/result.jsp&quot; /> </action> auto populates using bean getters/setters <form name=&quot;LoggingForm&quot;  …> <select name=&quot;category[0].value&quot; > </form> becomes request parameter category[0].value added to form using LoggingForm.getCategory(0).setValue(value) • • • • • • •
if submit, auto populates form bean from request params Page 1 Controller Action2 .java Struts- config. xml Mappings Business Logic Layer Data Layer View Layer Business Bean 1 Jsp Engine Jsp 1 Action3 .java Action4 .java Action1 .java Business Bean 2 Business Bean 3 Jsp 2 Jsp 3 Form Bean 1 Form Bean 2 Other Bean 1 request/session Web Browser Business Data reads on start-up creates incoming requests creates/reuses any associated form bean ,[object Object],[object Object],[object Object],[object Object],passes control to relevant action to handle interacts with lower layers - acts as adaptor between HTTP and layers below gets data to display (adds to beans in request/session)…or saves data from beans via business rules looks up path to determine action/ form bean returns appropriate forward relevant page called processes custom tags – fill form elements from beans, display internationalized messages pure HTML sent to browser Jsp 2 • • • • • • • Jsp 2 Action2 .java Form Bean 2 Web Server

Contenu connexe

Tendances

ASP.NET Session 10
ASP.NET Session 10ASP.NET Session 10
ASP.NET Session 10
Sisir Ghosh
 
Monitoring, troubleshooting,
Monitoring, troubleshooting,Monitoring, troubleshooting,
Monitoring, troubleshooting,
aspnet123
 
JSP Processing
JSP ProcessingJSP Processing
JSP Processing
Sadhana28
 

Tendances (20)

Load Testing with WAPT: Quick Start Guide
Load Testing with WAPT: Quick Start GuideLoad Testing with WAPT: Quick Start Guide
Load Testing with WAPT: Quick Start Guide
 
Templates, partials and layouts
Templates, partials and layoutsTemplates, partials and layouts
Templates, partials and layouts
 
Dash of ajax
Dash of ajaxDash of ajax
Dash of ajax
 
Presentation on asp.net controls
Presentation on asp.net controlsPresentation on asp.net controls
Presentation on asp.net controls
 
Web forms in ASP.net
Web forms in ASP.netWeb forms in ASP.net
Web forms in ASP.net
 
Asp.Net Mvc
Asp.Net MvcAsp.Net Mvc
Asp.Net Mvc
 
Asp.net web api
Asp.net web apiAsp.net web api
Asp.net web api
 
ASP.NET Session 10
ASP.NET Session 10ASP.NET Session 10
ASP.NET Session 10
 
Oracle ADF Case Study
Oracle ADF Case StudyOracle ADF Case Study
Oracle ADF Case Study
 
SFDC UI - Introduction to Visualforce
SFDC UI -  Introduction to VisualforceSFDC UI -  Introduction to Visualforce
SFDC UI - Introduction to Visualforce
 
All About Asp Net 4 0 Hosam Kamel
All About Asp Net 4 0  Hosam KamelAll About Asp Net 4 0  Hosam Kamel
All About Asp Net 4 0 Hosam Kamel
 
C sharp and asp.net interview questions
C sharp and asp.net interview questionsC sharp and asp.net interview questions
C sharp and asp.net interview questions
 
ASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server ControlsASP.NET 03 - Working With Web Server Controls
ASP.NET 03 - Working With Web Server Controls
 
Introduction to Oracle ADF Task Flows
Introduction to Oracle ADF Task FlowsIntroduction to Oracle ADF Task Flows
Introduction to Oracle ADF Task Flows
 
Ellicit forms and_reports
Ellicit forms and_reportsEllicit forms and_reports
Ellicit forms and_reports
 
MVC 4
MVC 4MVC 4
MVC 4
 
Monitoring, troubleshooting,
Monitoring, troubleshooting,Monitoring, troubleshooting,
Monitoring, troubleshooting,
 
03 asp.net session04
03 asp.net session0403 asp.net session04
03 asp.net session04
 
Customizations in Enterprise Applications using Oracle ADF
Customizations in Enterprise Applications using Oracle ADFCustomizations in Enterprise Applications using Oracle ADF
Customizations in Enterprise Applications using Oracle ADF
 
JSP Processing
JSP ProcessingJSP Processing
JSP Processing
 

En vedette (6)

Wiarygodność sklepu internetowego - system rekomendacji konsumenckiej Sklepy2...
Wiarygodność sklepu internetowego - system rekomendacji konsumenckiej Sklepy2...Wiarygodność sklepu internetowego - system rekomendacji konsumenckiej Sklepy2...
Wiarygodność sklepu internetowego - system rekomendacji konsumenckiej Sklepy2...
 
E X E M P L O S D E B L O G S
E X E M P L O S  D E  B L O G SE X E M P L O S  D E  B L O G S
E X E M P L O S D E B L O G S
 
Introducción a los Modelos De Datos
Introducción a los Modelos De DatosIntroducción a los Modelos De Datos
Introducción a los Modelos De Datos
 
pheonenalbikes
pheonenalbikespheonenalbikes
pheonenalbikes
 
Lenya and Shibboleth
Lenya and ShibbolethLenya and Shibboleth
Lenya and Shibboleth
 
Ed
EdEd
Ed
 

Similaire à Struts Intro

Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
Sagar Nakul
 
MVC & SQL_In_1_Hour
MVC & SQL_In_1_HourMVC & SQL_In_1_Hour
MVC & SQL_In_1_Hour
Dilip Patel
 
Struts Intro Course(1)
Struts Intro Course(1)Struts Intro Course(1)
Struts Intro Course(1)
wangjiaz
 
Lecture 11 Answers
Lecture 11 AnswersLecture 11 Answers
Lecture 11 Answers
is4030.ray
 

Similaire à Struts Intro (20)

Struts,Jsp,Servlet
Struts,Jsp,ServletStruts,Jsp,Servlet
Struts,Jsp,Servlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Struts Overview
Struts OverviewStruts Overview
Struts Overview
 
Jsf2.0 -4
Jsf2.0 -4Jsf2.0 -4
Jsf2.0 -4
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Struts2
Struts2Struts2
Struts2
 
Jsf 2.0 in depth
Jsf 2.0 in depthJsf 2.0 in depth
Jsf 2.0 in depth
 
ASP.NET MVC introduction
ASP.NET MVC introductionASP.NET MVC introduction
ASP.NET MVC introduction
 
CTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVC
 
Silicon Valley Code Camp - JSF Controller for Reusability
Silicon Valley Code Camp - JSF Controller for ReusabilitySilicon Valley Code Camp - JSF Controller for Reusability
Silicon Valley Code Camp - JSF Controller for Reusability
 
Internet Explorer 8 for Developers by Christian Thilmany
Internet Explorer 8 for Developers by Christian ThilmanyInternet Explorer 8 for Developers by Christian Thilmany
Internet Explorer 8 for Developers by Christian Thilmany
 
Intoduction to Play Framework
Intoduction to Play FrameworkIntoduction to Play Framework
Intoduction to Play Framework
 
MVC & SQL_In_1_Hour
MVC & SQL_In_1_HourMVC & SQL_In_1_Hour
MVC & SQL_In_1_Hour
 
Jsfsunum
JsfsunumJsfsunum
Jsfsunum
 
AJAX Workshop Notes
AJAX Workshop NotesAJAX Workshop Notes
AJAX Workshop Notes
 
Jsp Slides
Jsp SlidesJsp Slides
Jsp Slides
 
Struts Intro Course(1)
Struts Intro Course(1)Struts Intro Course(1)
Struts Intro Course(1)
 
Implementation of GUI Framework part3
Implementation of GUI Framework part3Implementation of GUI Framework part3
Implementation of GUI Framework part3
 
Lecture 11 Answers
Lecture 11 AnswersLecture 11 Answers
Lecture 11 Answers
 

Dernier

Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
ZurliaSoop
 
Mckinsey foundation level Handbook for Viewing
Mckinsey foundation level Handbook for ViewingMckinsey foundation level Handbook for Viewing
Mckinsey foundation level Handbook for Viewing
Nauman Safdar
 

Dernier (20)

HomeRoots Pitch Deck | Investor Insights | April 2024
HomeRoots Pitch Deck | Investor Insights | April 2024HomeRoots Pitch Deck | Investor Insights | April 2024
HomeRoots Pitch Deck | Investor Insights | April 2024
 
CROSS CULTURAL NEGOTIATION BY PANMISEM NS
CROSS CULTURAL NEGOTIATION BY PANMISEM NSCROSS CULTURAL NEGOTIATION BY PANMISEM NS
CROSS CULTURAL NEGOTIATION BY PANMISEM NS
 
Arti Languages Pre Seed Teaser Deck 2024.pdf
Arti Languages Pre Seed Teaser Deck 2024.pdfArti Languages Pre Seed Teaser Deck 2024.pdf
Arti Languages Pre Seed Teaser Deck 2024.pdf
 
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan CytotecJual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
Jual Obat Aborsi ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan Cytotec
 
GUWAHATI 💋 Call Girl 9827461493 Call Girls in Escort service book now
GUWAHATI 💋 Call Girl 9827461493 Call Girls in  Escort service book nowGUWAHATI 💋 Call Girl 9827461493 Call Girls in  Escort service book now
GUWAHATI 💋 Call Girl 9827461493 Call Girls in Escort service book now
 
Falcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business GrowthFalcon Invoice Discounting: Empowering Your Business Growth
Falcon Invoice Discounting: Empowering Your Business Growth
 
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGParadip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Paradip CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
Nashik Call Girl Just Call 7091819311 Top Class Call Girl Service Available
Nashik Call Girl Just Call 7091819311 Top Class Call Girl Service AvailableNashik Call Girl Just Call 7091819311 Top Class Call Girl Service Available
Nashik Call Girl Just Call 7091819311 Top Class Call Girl Service Available
 
Cannabis Legalization World Map: 2024 Updated
Cannabis Legalization World Map: 2024 UpdatedCannabis Legalization World Map: 2024 Updated
Cannabis Legalization World Map: 2024 Updated
 
Mckinsey foundation level Handbook for Viewing
Mckinsey foundation level Handbook for ViewingMckinsey foundation level Handbook for Viewing
Mckinsey foundation level Handbook for Viewing
 
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
Horngren’s Cost Accounting A Managerial Emphasis, Canadian 9th edition soluti...
 
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All TimeCall 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
Call 7737669865 Vadodara Call Girls Service at your Door Step Available All Time
 
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur CALL GIRL❤7091819311❤CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
How to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League CityHow to Get Started in Social Media for Art League City
How to Get Started in Social Media for Art League City
 
Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1Katrina Personal Brand Project and portfolio 1
Katrina Personal Brand Project and portfolio 1
 
Phases of Negotiation .pptx
 Phases of Negotiation .pptx Phases of Negotiation .pptx
Phases of Negotiation .pptx
 
JAJPUR CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN JAJPUR ESCORTS
JAJPUR CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN JAJPUR  ESCORTSJAJPUR CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN JAJPUR  ESCORTS
JAJPUR CALL GIRL ❤ 82729*64427❤ CALL GIRLS IN JAJPUR ESCORTS
 
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDINGBerhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
Berhampur 70918*19311 CALL GIRLS IN ESCORT SERVICE WE ARE PROVIDING
 
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
Chennai Call Gril 80022//12248 Only For Sex And High Profile Best Gril Sex Av...
 
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
Unveiling Falcon Invoice Discounting: Leading the Way as India's Premier Bill...
 

Struts Intro

  • 1.
  • 2. Model – View – Controller
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. creates / reuses index.htm Controller Show Logging Action .java Mappings Business Logic Layer Data Layer View Layer Jsp Engine LoggingBean.java logging.jsp Logging Form request/session Web Browser Granite Request: ShowLogging.do creates form bean in correct scope perform(mapping, form, request, response) calls business logic rule to get logging info returns forward(success) mainpulates data setCategoryList(list) forwards – logging.jsp expands custom tags response sent to browser – pure html ServerBean.java logging.jsp displays internationalized messages Web Server looks up <!-- Show logging --> <action path =&quot;/ShowLogging&quot; type =&quot;beans.ShowLoggingAction&quot; name =&quot;LoggingForm&quot;> < forward name=&quot;success“ path=&quot;/logging.jsp&quot; /> </action> populates form values <form name=&quot;LoggingForm&quot; …> <logic:iterate id=&quot;category“ name=&quot;LoggingForm&quot; property=&quot;categoryList&quot;> <bean:write name=&quot;category&quot; property=&quot;key&quot;/> <bean:write name=&quot;category&quot; property=&quot;desc&quot;/> … . </logic:iterate> </form> Messages Resources
  • 9. creates / reuses action instance logging.jsp Controller Show Logging Action .java Mappings Business Logic Layer Data Layer View Layer Jsp Engine LoggingBean.java results.jsp Logging Form request/session Web Browser Granite form submit – action=‘SaveLogging.do’ reuses form bean in correct scope calls perform(mapping, form, request, response) getCategoryList() returns mapping.findForward(&quot;success&quot;) forwards – result.jsp expands custom tags Displays internationalized messages from bean response sent to browser – pure html ServerBean.java Messages Bean add result messages For each one that user has changed… call business logic to change on server browser adds form variables to request results.jsp Web Server looks up <!-- Save logging --> <action path =&quot;/SaveLogging&quot; type =&quot;beans.SaveLoggingAction&quot; name =&quot;LoggingForm&quot;> < forward name=&quot;success“ path=&quot;/result.jsp&quot; /> </action> auto populates using bean getters/setters <form name=&quot;LoggingForm&quot; …> <select name=&quot;category[0].value&quot; > </form> becomes request parameter category[0].value added to form using LoggingForm.getCategory(0).setValue(value) • • • • • • •
  • 10.