尊敬的 微信汇率:1円 ≈ 0.046166 元 支付宝汇率:1円 ≈ 0.046257元 [退出登录]
SlideShare a Scribd company logo
Struts Agenda
 Software Crises
 What is Framework
 Model1,Model2
 What is Struts
 Why we need it
 Why is it called as
Struts
 Advantages of
Struts
 Controller
Elements & it’s
Responsibilities
 Model Elements &
it’s
Responsibilities
 View Elements &
it’s

Challenges Exist In Software
Development &
Software Crisis
* Time shown with out day light savings
 Projects must be developed
Quickly.
 Projects must be in High-Quality.
 Application Stability.
 Better code Maintainability.
 Lower Cost for Developing
Application.
What is Framework
 A software framework is a re-usable
design for a software system (or
subsystem).
 A framework is a pre-built assembly
of components and is designed to
be extended.
 It is also base for components.
Advantages of Framework
 Provide a procedure for the
development of Application.
 Saves developers Time.
 Provides same approach for all
developers for developing code and
Consistency in Software Design
 Provide low-level services that
developers can use to speedup
development.
 It also reduces software development
and maintenance costs.
Model 1
 In the Model 1 the
JSP page is
responsible for
processing the
incoming request
and replying back to
the client.
Disadvantages of Model1
 It does not have
separate
controller
 This Architecture
usually leads to a
significant
amount of Java
code embedded
within the JSP
page
 Model 1
Developers Designers
JSP
 Developers and designers
must work on the same files!
Model 2
 This Model2 approach
combines the use of
both servlets and JSP,
using JSP to generate
the presentation layer
and servlets to perform
process-intensive tasks.
 Model2 architecture
introduces a Servlet
between the
browser and the
JSP pages.
Model2 Advantages
 No processing/business logic within
the JSP page.
 Model 2 applications are easier to
maintain and extend, because views
do not refer to each other directly.
 The Model 2 controller servlet
provides a single point of control for
security and often encapsulates
incoming data into a form usable by
the back-end MVC model.
 It also Provides unique responsibility
to each component and each is
Model 2 Components and
Responsibilities  Model
 The Model portion of an
MVC-based System
responsible for internal
state of the system, and
actions that can be taken
to change that state
 Decide “How to do”
Controller
 -Decide “What to do”
 -The Controller portion of
the application is focused
on receiving requests
from the client ,deciding
what business logic is to
be performed ,and then
delegating responsibility
for producing the next
phase of user interface to
an appropriate View
What is Struts
 An open source web application
framework based on j2ee and java
which implements the MVC design
pattern is called Struts.
Why is it called as Struts
Strut synonym is Iron-rod.
Why we use and what are the
advantages of Struts
 It is open source.
 Provides components for building
Web Applications that speedup
development and saves time for
developers.
 It makes complex applications into
simple.
 Built in Exception Handling
 I18n support with resource bundles.
 Built in validation framework.
Struts Architecture
Struts Framework
Components
 Controller Components - Direct the
Action
 Model Components - Access
Data and
Systems
 View Components - What the
users see
Struts Controller Components
Struts-config.xml
Actionservlet and
Requestprocessor
 Receive the
HttpServletRequest
 Automatically
populate a
JavaBean from the
request
parameters.
 Handle Locale
Issues
 Determine which
 Extends
javax.servlet.http.HttpSe
rvlet
 Receives all framework
requests
 Selects proper
application module
 Delegates request
handling to the
RequestProcessor
instance
 One ActionServlet
Actionservlet and
Requestprocessor
 ActionServlet dispatch request to Request
Processor(New from 1.1. previous this
behaviour was in Action servlet)
 The work of Request Processor is:-
 Finding ActionMapping.
 Mapping Action to FormBean.
 Creating FormBean Object.
 Calling reset() method of FormBean
 Calling Validator of FormBean
 If no form(jsp/html) validation errors calls execute
method in Action Class and finding response to
request.
What is An Action Class
 Extends
org.apache.struts.action.Actio
n
 Overrides the execute() method
 Acts as a bridge between user-
invoked URI and a business
method
 Return information about which
Struts-Config.xml
 The power and
flexibility of struts is
due to the extracting
of configuration
information from
across frame work.
 Configuration file
contains action
mappings
(determines
navigation)
 Controller uses
mappings to turn
 Tags in this file
are:-
 Data Sources.
 Form Beans.
 Global Exceptions.
 Global Forwards
 Actions
 Controller
 Message resources
 Plug-in
Struts-Config.xml
The Model Components Model Components
 Java classes
 middle tier components
(EJB, Javabeans, …)
 database access
components
Used to represent the
Internal state of the
system
 Actions that can
change that state
 Internal state of system
represented by
 JavaBeans
Action Form Extends the ActionForm class
 Create one for each input form in the application
 It is just like a java bean, Store data temporary,
reset default values to views, validate input view.
 Hold state and behavior for user input.
 If defined in the ActionMapping configuration
file, the Controller Servlet will perform the
following:-
 Check for instance of bean of appropriate class
 If no bean exists, one is created automatically
 For every request parameter whose name corresponds
to the name of a property in the bean, the
corresponding setter method will be called
 The updated ActionForm bean will be passed to the
Action Class execute() method when it is called,
making these values immediately available.
ActionForm Example
The View Components
Struts JSP Tag Libraries
 HTML
 Bean
 Logic
 Nested
 Tiles
 Template
Html Tag & Bean Tag Libraries
 Tags used to
create Struts
input forms
 Examples
(checkbox,image,
link, submit ,text,
text area)
 Tags used for
accessing
JavaBeans and
their properties
 Examples
(Define,message,
write)
Logic ,Tiles & Nested Tag
Libraries
 Managing
conditional
generation of
output text
 Looping over
object Collections
for repetitive
generation of
output text
 Example
(empty,lessThan,
greaterThan)
 Extended the base
struts tags to allow
them to relate to
each other in
nested nature
 Tiles tags
Each part ("Tile")
of webpage can be
reused as often as
needed throughout
your application.
This reduces the
amount of markup
Template Tag Library
 The "struts-template" tag library
contains tags that are useful in
creating dynamic JSP templates for
pages which share a common format.
These templates are best used when it
is likely that a layout shared by
several pages in your application will
change. The functionality provided by
these tags is similar to what can be
achieved using standard JSP include
Action Message & Action Error
 Used to signify general purpose
informational and error messages
 Rely on the resource bundles
 JSP Tags can access them
 </html:errors>
Internationalization Support
 Much of the
framework
functionality
based on
java.util.Locale
 Struts Uses Java
Resource
Bundles.
 Ex:-
 Date ,Time and
Currency
Other Features Suported by
Struts Framework
 Multi-Module Support
 Declarative Exception-Handling
 Dynamic Action Forms
 Plugins
 Tiles integrated With Core
 Validator Integrated With Core
Struts Sequence Diagram
Struts Example 10.167.192.116l
ogin_app
 Webapps|
 |
sample(Application Name)
 |__ login.jsp

|__newLogin.Jsp

|__success.jsp
 |__WEB-INF

|__web.xml

|__Struts-config.xml

|__*.tldAll the struts
tld files
 |__lib
 |__*.jarAll the jar
files
 |
__classes
 |__LoginAction,LoginForm,
Disadvantages
 Bigger Learning Curve
 Not Based on Domain Model
 Property Names
 Views are restricted.
Questions & Answers
Thank u

More Related Content

What's hot

The State Design Pattern
The State Design PatternThe State Design Pattern
The State Design Pattern
Josh Candish
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design Patterns
Subramanyan Murali
 
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Edureka!
 
Difference between functional testing and non functional testing
Difference between functional testing and non functional testingDifference between functional testing and non functional testing
Difference between functional testing and non functional testing
pooja deshmukh
 
Salesforce testing best_practices
Salesforce testing best_practicesSalesforce testing best_practices
Salesforce testing best_practices
Vijayaragavan k 🌩️
 
Software Testing - Defect/Bug Life Cycle - Complete Flow Chart of Defect States
Software Testing - Defect/Bug Life Cycle - Complete Flow Chart of Defect StatesSoftware Testing - Defect/Bug Life Cycle - Complete Flow Chart of Defect States
Software Testing - Defect/Bug Life Cycle - Complete Flow Chart of Defect States
eVideoTuition
 
Performance tests with Gatling (extended)
Performance tests with Gatling (extended)Performance tests with Gatling (extended)
Performance tests with Gatling (extended)
Andrzej Ludwikowski
 
Design Principles
Design PrinciplesDesign Principles
Angular Notes.pdf
Angular Notes.pdfAngular Notes.pdf
Angular Notes.pdf
sagarpal60
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And Mocking
Joe Wilson
 
Chapter 9 Testing Strategies.ppt
Chapter 9 Testing Strategies.pptChapter 9 Testing Strategies.ppt
Chapter 9 Testing Strategies.ppt
VijayaPratapReddyM
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
PradeepDyavannanavar
 
Introduction to Automation Testing and Selenium overiew
Introduction to Automation Testing and Selenium overiewIntroduction to Automation Testing and Selenium overiew
Introduction to Automation Testing and Selenium overiew
Disha Srivastava
 
Spring ppt
Spring pptSpring ppt
Spring ppt
Mumbai Academisc
 
Cross browser testing
Cross browser testingCross browser testing
Cross browser testing
Perfecto Mobile
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
Swati Bansal
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
Sergey Podolsky
 
Unit testing
Unit testingUnit testing
Unit testing
Slideshare
 
Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testing
ikhwanhayat
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4
Mohammad Faizan
 

What's hot (20)

The State Design Pattern
The State Design PatternThe State Design Pattern
The State Design Pattern
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design Patterns
 
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
Introduction to Selenium | Selenium Tutorial for Beginners | Selenium Trainin...
 
Difference between functional testing and non functional testing
Difference between functional testing and non functional testingDifference between functional testing and non functional testing
Difference between functional testing and non functional testing
 
Salesforce testing best_practices
Salesforce testing best_practicesSalesforce testing best_practices
Salesforce testing best_practices
 
Software Testing - Defect/Bug Life Cycle - Complete Flow Chart of Defect States
Software Testing - Defect/Bug Life Cycle - Complete Flow Chart of Defect StatesSoftware Testing - Defect/Bug Life Cycle - Complete Flow Chart of Defect States
Software Testing - Defect/Bug Life Cycle - Complete Flow Chart of Defect States
 
Performance tests with Gatling (extended)
Performance tests with Gatling (extended)Performance tests with Gatling (extended)
Performance tests with Gatling (extended)
 
Design Principles
Design PrinciplesDesign Principles
Design Principles
 
Angular Notes.pdf
Angular Notes.pdfAngular Notes.pdf
Angular Notes.pdf
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And Mocking
 
Chapter 9 Testing Strategies.ppt
Chapter 9 Testing Strategies.pptChapter 9 Testing Strategies.ppt
Chapter 9 Testing Strategies.ppt
 
Presentation1.pptx
Presentation1.pptxPresentation1.pptx
Presentation1.pptx
 
Introduction to Automation Testing and Selenium overiew
Introduction to Automation Testing and Selenium overiewIntroduction to Automation Testing and Selenium overiew
Introduction to Automation Testing and Selenium overiew
 
Spring ppt
Spring pptSpring ppt
Spring ppt
 
Cross browser testing
Cross browser testingCross browser testing
Cross browser testing
 
Selenium Concepts
Selenium ConceptsSelenium Concepts
Selenium Concepts
 
Unit Testing
Unit TestingUnit Testing
Unit Testing
 
Unit testing
Unit testingUnit testing
Unit testing
 
Understanding Unit Testing
Understanding Unit TestingUnderstanding Unit Testing
Understanding Unit Testing
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4
 

Similar to Struts Ppt 1

Struts ppt 1
Struts ppt 1Struts ppt 1
Struts ppt 1
pavanteja86
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts framework
s4al_com
 
Struts N E W
Struts N E WStruts N E W
Struts N E W
patinijava
 
Struts
StrutsStruts
Struts
Ranjan Kumar
 
MVC
MVCMVC
MVC
akshin
 
Krazykoder struts2 intro
Krazykoder struts2 introKrazykoder struts2 intro
Krazykoder struts2 intro
Krazy Koder
 
Struts Interview Questions
Struts Interview QuestionsStruts Interview Questions
Struts Interview Questions
jbashask
 
Struts 2 Overview
Struts 2 OverviewStruts 2 Overview
Struts 2 Overview
skill-guru
 
important struts interview questions
important struts interview questionsimportant struts interview questions
important struts interview questions
surendray
 
J2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for womenJ2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for women
lissa cidhi
 
Struts 1
Struts 1Struts 1
Struts 1
Lalit Garg
 
Struts course material
Struts course materialStruts course material
Struts course material
Vibrant Technologies & Computers
 
Apachecon 2002 Struts
Apachecon 2002 StrutsApachecon 2002 Struts
Apachecon 2002 Struts
yesprakash
 
Skillwise Struts.x
Skillwise Struts.xSkillwise Struts.x
Skillwise Struts.x
Skillwise Group
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
Sunil Patil
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
Sunil Patil
 
Exploiting Web Technologies to connect business process management and engine...
Exploiting Web Technologies to connect business process management and engine...Exploiting Web Technologies to connect business process management and engine...
Exploiting Web Technologies to connect business process management and engine...
Stefano Costanzo
 
Ibm
IbmIbm
Ibm
techbed
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2
divzi1913
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
Anton Krasnoshchok
 

Similar to Struts Ppt 1 (20)

Struts ppt 1
Struts ppt 1Struts ppt 1
Struts ppt 1
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts framework
 
Struts N E W
Struts N E WStruts N E W
Struts N E W
 
Struts
StrutsStruts
Struts
 
MVC
MVCMVC
MVC
 
Krazykoder struts2 intro
Krazykoder struts2 introKrazykoder struts2 intro
Krazykoder struts2 intro
 
Struts Interview Questions
Struts Interview QuestionsStruts Interview Questions
Struts Interview Questions
 
Struts 2 Overview
Struts 2 OverviewStruts 2 Overview
Struts 2 Overview
 
important struts interview questions
important struts interview questionsimportant struts interview questions
important struts interview questions
 
J2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for womenJ2EE PPT --CINTHIYA.M Krishnammal college for women
J2EE PPT --CINTHIYA.M Krishnammal college for women
 
Struts 1
Struts 1Struts 1
Struts 1
 
Struts course material
Struts course materialStruts course material
Struts course material
 
Apachecon 2002 Struts
Apachecon 2002 StrutsApachecon 2002 Struts
Apachecon 2002 Struts
 
Skillwise Struts.x
Skillwise Struts.xSkillwise Struts.x
Skillwise Struts.x
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
 
Exploiting Web Technologies to connect business process management and engine...
Exploiting Web Technologies to connect business process management and engine...Exploiting Web Technologies to connect business process management and engine...
Exploiting Web Technologies to connect business process management and engine...
 
Ibm
IbmIbm
Ibm
 
Struts 2-overview2
Struts 2-overview2Struts 2-overview2
Struts 2-overview2
 
MVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVCMVC Pattern. Flex implementation of MVC
MVC Pattern. Flex implementation of MVC
 

Recently uploaded

CTO Insights: Steering a High-Stakes Database Migration
CTO Insights: Steering a High-Stakes Database MigrationCTO Insights: Steering a High-Stakes Database Migration
CTO Insights: Steering a High-Stakes Database Migration
ScyllaDB
 
Day 4 - Excel Automation and Data Manipulation
Day 4 - Excel Automation and Data ManipulationDay 4 - Excel Automation and Data Manipulation
Day 4 - Excel Automation and Data Manipulation
UiPathCommunity
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
ScyllaDB
 
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc
 
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My IdentityCNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
Cynthia Thomas
 
Multivendor cloud production with VSF TR-11 - there and back again
Multivendor cloud production with VSF TR-11 - there and back againMultivendor cloud production with VSF TR-11 - there and back again
Multivendor cloud production with VSF TR-11 - there and back again
Kieran Kunhya
 
Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
Tobias Schneck
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
Enterprise Knowledge
 
Discover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched ContentDiscover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched Content
ScyllaDB
 
APJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes WebinarAPJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes Webinar
ThousandEyes
 
Introduction to ThousandEyes AMER Webinar
Introduction  to ThousandEyes AMER WebinarIntroduction  to ThousandEyes AMER Webinar
Introduction to ThousandEyes AMER Webinar
ThousandEyes
 
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google CloudRadically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
ScyllaDB
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
zjhamm304
 
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
leebarnesutopia
 
From NCSA to the National Research Platform
From NCSA to the National Research PlatformFrom NCSA to the National Research Platform
From NCSA to the National Research Platform
Larry Smarr
 
Cyber Recovery Wargame
Cyber Recovery WargameCyber Recovery Wargame
Cyber Recovery Wargame
Databarracks
 
ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes New Product Features and Release Highlights: June 2024ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes
 
So You've Lost Quorum: Lessons From Accidental Downtime
So You've Lost Quorum: Lessons From Accidental DowntimeSo You've Lost Quorum: Lessons From Accidental Downtime
So You've Lost Quorum: Lessons From Accidental Downtime
ScyllaDB
 
MongoDB vs ScyllaDB: Tractian’s Experience with Real-Time ML
MongoDB vs ScyllaDB: Tractian’s Experience with Real-Time MLMongoDB vs ScyllaDB: Tractian’s Experience with Real-Time ML
MongoDB vs ScyllaDB: Tractian’s Experience with Real-Time ML
ScyllaDB
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
Ortus Solutions, Corp
 

Recently uploaded (20)

CTO Insights: Steering a High-Stakes Database Migration
CTO Insights: Steering a High-Stakes Database MigrationCTO Insights: Steering a High-Stakes Database Migration
CTO Insights: Steering a High-Stakes Database Migration
 
Day 4 - Excel Automation and Data Manipulation
Day 4 - Excel Automation and Data ManipulationDay 4 - Excel Automation and Data Manipulation
Day 4 - Excel Automation and Data Manipulation
 
ScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking ReplicationScyllaDB Tablets: Rethinking Replication
ScyllaDB Tablets: Rethinking Replication
 
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
TrustArc Webinar - Your Guide for Smooth Cross-Border Data Transfers and Glob...
 
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My IdentityCNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
CNSCon 2024 Lightning Talk: Don’t Make Me Impersonate My Identity
 
Multivendor cloud production with VSF TR-11 - there and back again
Multivendor cloud production with VSF TR-11 - there and back againMultivendor cloud production with VSF TR-11 - there and back again
Multivendor cloud production with VSF TR-11 - there and back again
 
Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
 
Demystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through StorytellingDemystifying Knowledge Management through Storytelling
Demystifying Knowledge Management through Storytelling
 
Discover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched ContentDiscover the Unseen: Tailored Recommendation of Unwatched Content
Discover the Unseen: Tailored Recommendation of Unwatched Content
 
APJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes WebinarAPJC Introduction to ThousandEyes Webinar
APJC Introduction to ThousandEyes Webinar
 
Introduction to ThousandEyes AMER Webinar
Introduction  to ThousandEyes AMER WebinarIntroduction  to ThousandEyes AMER Webinar
Introduction to ThousandEyes AMER Webinar
 
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google CloudRadically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
Radically Outperforming DynamoDB @ Digital Turbine with SADA and Google Cloud
 
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...QA or the Highway - Component Testing: Bridging the gap between frontend appl...
QA or the Highway - Component Testing: Bridging the gap between frontend appl...
 
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
 
From NCSA to the National Research Platform
From NCSA to the National Research PlatformFrom NCSA to the National Research Platform
From NCSA to the National Research Platform
 
Cyber Recovery Wargame
Cyber Recovery WargameCyber Recovery Wargame
Cyber Recovery Wargame
 
ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes New Product Features and Release Highlights: June 2024ThousandEyes New Product Features and Release Highlights: June 2024
ThousandEyes New Product Features and Release Highlights: June 2024
 
So You've Lost Quorum: Lessons From Accidental Downtime
So You've Lost Quorum: Lessons From Accidental DowntimeSo You've Lost Quorum: Lessons From Accidental Downtime
So You've Lost Quorum: Lessons From Accidental Downtime
 
MongoDB vs ScyllaDB: Tractian’s Experience with Real-Time ML
MongoDB vs ScyllaDB: Tractian’s Experience with Real-Time MLMongoDB vs ScyllaDB: Tractian’s Experience with Real-Time ML
MongoDB vs ScyllaDB: Tractian’s Experience with Real-Time ML
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
 

Struts Ppt 1

  • 1.
  • 2. Struts Agenda  Software Crises  What is Framework  Model1,Model2  What is Struts  Why we need it  Why is it called as Struts  Advantages of Struts  Controller Elements & it’s Responsibilities  Model Elements & it’s Responsibilities  View Elements & it’s 
  • 3. Challenges Exist In Software Development & Software Crisis * Time shown with out day light savings  Projects must be developed Quickly.  Projects must be in High-Quality.  Application Stability.  Better code Maintainability.  Lower Cost for Developing Application.
  • 4. What is Framework  A software framework is a re-usable design for a software system (or subsystem).  A framework is a pre-built assembly of components and is designed to be extended.  It is also base for components.
  • 5. Advantages of Framework  Provide a procedure for the development of Application.  Saves developers Time.  Provides same approach for all developers for developing code and Consistency in Software Design  Provide low-level services that developers can use to speedup development.  It also reduces software development and maintenance costs.
  • 6. Model 1  In the Model 1 the JSP page is responsible for processing the incoming request and replying back to the client.
  • 7. Disadvantages of Model1  It does not have separate controller  This Architecture usually leads to a significant amount of Java code embedded within the JSP page  Model 1 Developers Designers JSP  Developers and designers must work on the same files!
  • 8. Model 2  This Model2 approach combines the use of both servlets and JSP, using JSP to generate the presentation layer and servlets to perform process-intensive tasks.  Model2 architecture introduces a Servlet between the browser and the JSP pages.
  • 9. Model2 Advantages  No processing/business logic within the JSP page.  Model 2 applications are easier to maintain and extend, because views do not refer to each other directly.  The Model 2 controller servlet provides a single point of control for security and often encapsulates incoming data into a form usable by the back-end MVC model.  It also Provides unique responsibility to each component and each is
  • 10. Model 2 Components and Responsibilities  Model  The Model portion of an MVC-based System responsible for internal state of the system, and actions that can be taken to change that state  Decide “How to do” Controller  -Decide “What to do”  -The Controller portion of the application is focused on receiving requests from the client ,deciding what business logic is to be performed ,and then delegating responsibility for producing the next phase of user interface to an appropriate View
  • 11. What is Struts  An open source web application framework based on j2ee and java which implements the MVC design pattern is called Struts. Why is it called as Struts Strut synonym is Iron-rod.
  • 12. Why we use and what are the advantages of Struts  It is open source.  Provides components for building Web Applications that speedup development and saves time for developers.  It makes complex applications into simple.  Built in Exception Handling  I18n support with resource bundles.  Built in validation framework.
  • 14. Struts Framework Components  Controller Components - Direct the Action  Model Components - Access Data and Systems  View Components - What the users see
  • 16. Actionservlet and Requestprocessor  Receive the HttpServletRequest  Automatically populate a JavaBean from the request parameters.  Handle Locale Issues  Determine which  Extends javax.servlet.http.HttpSe rvlet  Receives all framework requests  Selects proper application module  Delegates request handling to the RequestProcessor instance  One ActionServlet
  • 17. Actionservlet and Requestprocessor  ActionServlet dispatch request to Request Processor(New from 1.1. previous this behaviour was in Action servlet)  The work of Request Processor is:-  Finding ActionMapping.  Mapping Action to FormBean.  Creating FormBean Object.  Calling reset() method of FormBean  Calling Validator of FormBean  If no form(jsp/html) validation errors calls execute method in Action Class and finding response to request.
  • 18. What is An Action Class  Extends org.apache.struts.action.Actio n  Overrides the execute() method  Acts as a bridge between user- invoked URI and a business method  Return information about which
  • 19. Struts-Config.xml  The power and flexibility of struts is due to the extracting of configuration information from across frame work.  Configuration file contains action mappings (determines navigation)  Controller uses mappings to turn  Tags in this file are:-  Data Sources.  Form Beans.  Global Exceptions.  Global Forwards  Actions  Controller  Message resources  Plug-in Struts-Config.xml
  • 20. The Model Components Model Components  Java classes  middle tier components (EJB, Javabeans, …)  database access components Used to represent the Internal state of the system  Actions that can change that state  Internal state of system represented by  JavaBeans
  • 21. Action Form Extends the ActionForm class  Create one for each input form in the application  It is just like a java bean, Store data temporary, reset default values to views, validate input view.  Hold state and behavior for user input.  If defined in the ActionMapping configuration file, the Controller Servlet will perform the following:-  Check for instance of bean of appropriate class  If no bean exists, one is created automatically  For every request parameter whose name corresponds to the name of a property in the bean, the corresponding setter method will be called  The updated ActionForm bean will be passed to the Action Class execute() method when it is called, making these values immediately available. ActionForm Example
  • 23. Struts JSP Tag Libraries  HTML  Bean  Logic  Nested  Tiles  Template
  • 24. Html Tag & Bean Tag Libraries  Tags used to create Struts input forms  Examples (checkbox,image, link, submit ,text, text area)  Tags used for accessing JavaBeans and their properties  Examples (Define,message, write)
  • 25. Logic ,Tiles & Nested Tag Libraries  Managing conditional generation of output text  Looping over object Collections for repetitive generation of output text  Example (empty,lessThan, greaterThan)  Extended the base struts tags to allow them to relate to each other in nested nature  Tiles tags Each part ("Tile") of webpage can be reused as often as needed throughout your application. This reduces the amount of markup
  • 26. Template Tag Library  The "struts-template" tag library contains tags that are useful in creating dynamic JSP templates for pages which share a common format. These templates are best used when it is likely that a layout shared by several pages in your application will change. The functionality provided by these tags is similar to what can be achieved using standard JSP include
  • 27. Action Message & Action Error  Used to signify general purpose informational and error messages  Rely on the resource bundles  JSP Tags can access them  </html:errors>
  • 28. Internationalization Support  Much of the framework functionality based on java.util.Locale  Struts Uses Java Resource Bundles.  Ex:-  Date ,Time and Currency
  • 29. Other Features Suported by Struts Framework  Multi-Module Support  Declarative Exception-Handling  Dynamic Action Forms  Plugins  Tiles integrated With Core  Validator Integrated With Core
  • 31. Struts Example 10.167.192.116l ogin_app  Webapps|  | sample(Application Name)  |__ login.jsp  |__newLogin.Jsp  |__success.jsp  |__WEB-INF  |__web.xml  |__Struts-config.xml  |__*.tldAll the struts tld files  |__lib  |__*.jarAll the jar files  | __classes  |__LoginAction,LoginForm,
  • 32. Disadvantages  Bigger Learning Curve  Not Based on Domain Model  Property Names  Views are restricted.

Editor's Notes

  1. Frame work Provides Core Services A framework is designed to offer a large number of related services centered on a broad theme. It is also base for components Ex:-car
  2. 1.A Model 1 application control is decentralized, because the current page being displayed determines the next page to display 2. Architecture usually leads to a significant amount of Java code embedded within the JSP page While this may not seem to be much of a problem for Java developers, it is certainly an issue if your JSP pages are created and maintained by designers
  3. This approach typically results in the cleanest separation of presentation from content, leading to clear delineation of the roles and responsibilities of the developers and page designers.
  4. When building physical structures Construction Engineers use support for each floor of building .Likewise, Software engineers also use some frame work to support each layer of their Applications. That why we call it as Struts.
  5. WebDAV was a working group of the Internet Engineering Task Force .The name is an abbreviation for Web-based Distributed Authoring and Versioning and also refers to the set of extensions to the Hypertext Transfer Protocol (HTTP) that the group defined which allows users to collaboratively edit and manage files on remote World Wide Web servers
  6. System State Beans Actual state of a system is normally represented as a set of one or more JavaBeans classes, whose properties define the current state. For small to medium sized applications, business logic beans might be ordinary JavaBeans that interact with system state beans passed as arguments, or ordinary JavaBeans that access a database using JDBC calls For larger applications, these beans will often be stateful or stateless Enterprise JavaBeans (EJBs).
  翻译: