SlideShare a Scribd company logo
1 of 91
Vikas Manoria IT Specialist – IBM Academic Initiative [email_address] Section -3) Web Development
Section 3 -  Web Development (20%)   ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The Key Views of the Web Perspective 1 4 2 3 5 7 6
Static Projects and Dynamic Projects ,[object Object],[object Object],[object Object],[object Object],[object Object]
Web Application - Static • Organizations want to make their information available to as many people in the world as possible. This can be achieved by using the Web, delivering the information as static HTML pages
Web Application Evolution - Servlets Applets cannot access data on back-end systems. A Web container can provide server-side components (such as Servlets) to generate dynamic content
Web Application Evolution - JSPs Servlets give poor separation between business logic and presentation logic. Use JavaServer Pages and JavaBeans to improve separation
MVC design pattern ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
An Overview of the Web Resource Wizards ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Dynamic Web Project Wizard (1 of 3) ,[object Object],[object Object],[object Object],[object Object]
Dynamic Web Project Wizard (2 of 3) ,[object Object],[object Object],[object Object],[object Object],[object Object]
Dynamic Web Project Wizard (3 of 3) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Page Templates ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Design-Time and Dynamic Templates ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Content Area Nav Bar Header
The Structure of a Web Project ,[object Object],[object Object]
The WebContent Folder ,[object Object],[object Object],[object Object],[object Object],[object Object],http://myServer:port/Library/Register.jsp
The WEB-INF Folder ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Navigating the Deployment Descriptor (1 of 2) ,[object Object],[object Object]
Navigating the Deployment Descriptor (2 of 2) ,[object Object],[object Object]
Organize Web Pages in a Site Hierarchy ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Web Site Navigation Overview 1 2 4 5 3
Relationship between Web Site Pages ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Relationship with External Links ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Icon represents an external link in the Web Site Navigation
Group Logical Set of Web Pages ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Web Site Details Overview 1 2 3 4 5
Add Navigation Elements to Web Pages (1 of 2) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Add Navigation Elements to Web Pages (2 of 2)
Add Web Pages to the Web Diagram ,[object Object],[object Object],[object Object]
Add Web Page Links in the Web Diagram ,[object Object],[object Object],[object Object],[object Object],1 2 3
The New Web Page Wizard:  HTML/XHTML Template ,[object Object],[object Object],[object Object],[object Object]
The JSP Wizard ,[object Object],[object Object]
The Page Designer Editor ,[object Object],[object Object],[object Object],[object Object],[object Object]
JSP Architecture ,[object Object],[object Object],[object Object]
Adding Tags Using the Palette View ,[object Object],[object Object],[object Object]
Using the Insert Menu   ,[object Object],[object Object],[object Object],[object Object],[object Object]
Inserting JSP Code in the Page Designer ,[object Object],[object Object],[object Object]
Inserting JSP Custom Tags ,[object Object],[object Object],[object Object]
Modifying Tag Properties in the Properties View ,[object Object],[object Object]
Adding Variables to the Page Data View ,[object Object],[object Object],[object Object],[object Object]
Editing JavaScript in the Quick Edit View   ,[object Object],[object Object],[object Object]
The Cascading StyleSheet Wizard ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Editing CSS Files in the CSS Designer   ,[object Object],[object Object]
Using the Links View ,[object Object],[object Object],[object Object]
Configuring Pages in the Deployment Descriptor ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
What is a Servlet ? ,[object Object],[object Object],[object Object],[object Object],“ A  Servlet  is a Web component, managed by a container, that generates dynamic content. Servlets are small, platform-independent Java classes compiled to an architecture-neutral byte code that can be loaded dynamically into and run by a Web server”
Steps to Create a New Servlet ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Create Servlet Wizard (1 of 3) 1 4 6 3 2 5 7
Create Servlet Wizard (2 of 3) ,[object Object],[object Object],[object Object],[object Object],[object Object],9 10 11 8
Create Servlet Wizard (3 of 3) ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],12 14 13 15 16 17
Servlets in the Web Project ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],1 3 2
Web Deployment Descriptor Servlet Settings 1 4 3 2 5
Servlet Settings Source Editor
What Is Struts? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Struts is an MVC Framework ,[object Object],[object Object],Controller View Configuration files (XML) Model Data Store request response Struts framework
Extensions to the Basic Struts Framework ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Creating Struts Components Using Wizards ,[object Object],[object Object],ActionServlet JSP Persistence Resource Bundle RequestProcessor ActionForm Tiles struts-config.xml Action Beans
A Struts-Enabled Project ,[object Object],[object Object],[object Object]
Creating Struts Modules ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Associating Struts Modules with a Project ,[object Object],[object Object],[object Object],[object Object],<init-param> <param-name>config</param-name> <param-value> /WEB-INF/struts-config.xml </param-value> </init-param> <init-param> <param-name>   config/NewModule </param-name> <param-value> /WEB-INF/struts-NewModule.xml </param-value> </init-param>
Mapping Struts Applications with Web Diagrams
Examining Struts Resources ,[object Object]
Examining the Struts Configuration File ,[object Object],[object Object],[object Object],[object Object],<init-param> <param-name>config</param-name> <param-value>/WEB-INF/ struts-config.xml </param-value> </init-param> <init-param> <param-name>config/Account</param-name> <param-value>/WEB-INF/ struts-Account.xml </param-value> </init-param> <init-param> <param-name>config/Customer</param-name> <param-value>/WEB-INF/ struts-Customer.xml </param-value> </init-param>
A Closer Look at the <action-mappings> Tag ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],index.jsp LoginForm ActionErrors validate(args) Validation OK?  NO | YES LoginAction 1 2 3 4 5 6 error.jsp home.jsp … /login.do 1 2 3 4 6 5
What Is JavaServer Faces Technology? ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Parts of a JSF Application IBM WebSphere Application Server J2EE Enterprise Application JSF Web Application Faces Configuration File Faces Servlet Faces JSP File Component Tree Web Client Managed Beans JSF Libraries/Tags Validators Events
JSF Development Steps ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Create a Dynamic Web Project ,[object Object],[object Object],[object Object],[object Object],[object Object]
Create a Faces JSP File ,[object Object],[object Object],[object Object],[object Object]
Add Data Components to the Page Data View ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Bind Page Data to Faces Components ,[object Object],[object Object],[object Object],[object Object]
Add UI Components to a Faces JSF File 1 3 2 4 5
Standard Faces Components ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Enhanced Faces Components ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Map JSF Components in Web Diagrams ,[object Object],[object Object],[object Object],[object Object]
Code Event Handlers in the Quick Edit View ,[object Object],[object Object],[object Object],[object Object],[object Object]
JSF Application Organization and Artifacts  1 2 3 4 5
Multiple Faces-config Files ,[object Object],[object Object]
JSF Pages and the Page Code Class ,[object Object],[object Object],[object Object],[object Object],JSF Web Application Persistence Faces JSP File beans Page Code Class Events
Page Code Class Suppression ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Checkpoint ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Checkpoint answers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Checkpoint ,[object Object],[object Object],[object Object],[object Object]
Checkpoint answers ,[object Object],[object Object],[object Object],[object Object]
Checkpoint ,[object Object],[object Object],[object Object],[object Object],[object Object]
Checkpoint answers ,[object Object],[object Object],[object Object],[object Object],[object Object]
Checkpoint ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Checkpoint answers ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Checkpoint ,[object Object],[object Object],[object Object],[object Object]
Checkpoint answers ,[object Object],[object Object],[object Object],[object Object]
Lab  ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Japanese Hebrew Thank You English Merci French Russian Danke German Grazie Italian Gracias Spanish Obrigado Portuguese Arabic Simplified Chinese Traditional Chinese Thai Korean

More Related Content

What's hot

Struts Introduction Course
Struts Introduction CourseStruts Introduction Course
Struts Introduction Course
guest764934
 
14 asp.net session20
14 asp.net session2014 asp.net session20
14 asp.net session20
Niit Care
 
Srikanth Kumar SharePoint Developer
Srikanth Kumar SharePoint DeveloperSrikanth Kumar SharePoint Developer
Srikanth Kumar SharePoint Developer
Srikanth Kumar
 
Jdev handbook-ch01-130992
Jdev handbook-ch01-130992Jdev handbook-ch01-130992
Jdev handbook-ch01-130992
psriapps
 
Exchange Server 2013 and SharePoint Server 2013 Integration
Exchange Server 2013 and SharePoint Server 2013 IntegrationExchange Server 2013 and SharePoint Server 2013 Integration
Exchange Server 2013 and SharePoint Server 2013 Integration
SharePoint Saturday New Jersey
 
Peoplesoft Basic App designer
Peoplesoft Basic App designerPeoplesoft Basic App designer
Peoplesoft Basic App designer
mbtechnosolutions
 

What's hot (20)

Struts Introduction Course
Struts Introduction CourseStruts Introduction Course
Struts Introduction Course
 
Greate Introduction to Oracle Fusion Middleware and ADF
Greate Introduction to Oracle Fusion Middleware and ADFGreate Introduction to Oracle Fusion Middleware and ADF
Greate Introduction to Oracle Fusion Middleware and ADF
 
Oracle ADF 11g Tutorial
Oracle ADF 11g TutorialOracle ADF 11g Tutorial
Oracle ADF 11g Tutorial
 
37727897 Oaf Basics
37727897 Oaf Basics37727897 Oaf Basics
37727897 Oaf Basics
 
Example User Stories Specification for ReqView
Example User Stories Specification for ReqViewExample User Stories Specification for ReqView
Example User Stories Specification for ReqView
 
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
Oracle EBS 12.1.3 : Integrate OA Framework BC4J components within java concur...
 
Oracle Apex Overview
Oracle Apex OverviewOracle Apex Overview
Oracle Apex Overview
 
14 asp.net session20
14 asp.net session2014 asp.net session20
14 asp.net session20
 
Oracle Framework Personalization
Oracle Framework PersonalizationOracle Framework Personalization
Oracle Framework Personalization
 
Srikanth Kumar SharePoint Developer
Srikanth Kumar SharePoint DeveloperSrikanth Kumar SharePoint Developer
Srikanth Kumar SharePoint Developer
 
Jdev handbook-ch01-130992
Jdev handbook-ch01-130992Jdev handbook-ch01-130992
Jdev handbook-ch01-130992
 
Pragmatic orchard
Pragmatic orchardPragmatic orchard
Pragmatic orchard
 
Exchange Server 2013 and SharePoint Server 2013 Integration
Exchange Server 2013 and SharePoint Server 2013 IntegrationExchange Server 2013 and SharePoint Server 2013 Integration
Exchange Server 2013 and SharePoint Server 2013 Integration
 
Universal Java Beans with DB2 from 1999, early Internet work
Universal Java Beans with DB2 from 1999, early Internet workUniversal Java Beans with DB2 from 1999, early Internet work
Universal Java Beans with DB2 from 1999, early Internet work
 
Database application developer's guide
Database application developer's guideDatabase application developer's guide
Database application developer's guide
 
Struts notes
Struts notesStruts notes
Struts notes
 
Spring Framework-II
Spring Framework-IISpring Framework-II
Spring Framework-II
 
Peoplesoft Basic App designer
Peoplesoft Basic App designerPeoplesoft Basic App designer
Peoplesoft Basic App designer
 
F1488647857 sewtz
F1488647857 sewtzF1488647857 sewtz
F1488647857 sewtz
 
Struts N E W
Struts N E WStruts N E W
Struts N E W
 

Viewers also liked (7)

Lecture 11 bitwise_operator
Lecture 11 bitwise_operatorLecture 11 bitwise_operator
Lecture 11 bitwise_operator
 
principle of oop’s in cpp
principle of oop’s in cppprinciple of oop’s in cpp
principle of oop’s in cpp
 
Web Applications and Deployment
Web Applications and DeploymentWeb Applications and Deployment
Web Applications and Deployment
 
Inheritance C#
Inheritance C#Inheritance C#
Inheritance C#
 
WebLogic Deployment Plan Example
WebLogic Deployment Plan ExampleWebLogic Deployment Plan Example
WebLogic Deployment Plan Example
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 
7 inheritance and polymorphism
7   inheritance and polymorphism7   inheritance and polymorphism
7 inheritance and polymorphism
 

Similar to 3) web development

Design And Documentation
Design And DocumentationDesign And Documentation
Design And Documentation
Miles Price
 
Ofc216 Shah German Webcms
Ofc216 Shah German WebcmsOfc216 Shah German Webcms
Ofc216 Shah German Webcms
Punk Rock
 
Site Templates in SP 13
Site Templates in SP 13Site Templates in SP 13
Site Templates in SP 13
Shahzad S
 
TID Chapter 8 Web Page Development
TID Chapter 8 Web Page DevelopmentTID Chapter 8 Web Page Development
TID Chapter 8 Web Page Development
WanBK Leo
 
SharePoint 2007 Presentation
SharePoint 2007 PresentationSharePoint 2007 Presentation
SharePoint 2007 Presentation
Ajay Jain
 
Share point 2010-uiimprovements
Share point 2010-uiimprovementsShare point 2010-uiimprovements
Share point 2010-uiimprovements
LiquidHub
 

Similar to 3) web development (20)

Design And Documentation
Design And DocumentationDesign And Documentation
Design And Documentation
 
Ofc216 Shah German Webcms
Ofc216 Shah German WebcmsOfc216 Shah German Webcms
Ofc216 Shah German Webcms
 
Walkthrough asp.net
Walkthrough asp.netWalkthrough asp.net
Walkthrough asp.net
 
Creating Web Pages with Microsoft FrontPage - R.D.Sivakumar
Creating Web Pages with Microsoft FrontPage - R.D.SivakumarCreating Web Pages with Microsoft FrontPage - R.D.Sivakumar
Creating Web Pages with Microsoft FrontPage - R.D.Sivakumar
 
Web designing and publishing computer studies theory lesson
Web designing and publishing computer studies theory lessonWeb designing and publishing computer studies theory lesson
Web designing and publishing computer studies theory lesson
 
As pnet
As pnetAs pnet
As pnet
 
Web development
Web developmentWeb development
Web development
 
Site Templates in SP 13
Site Templates in SP 13Site Templates in SP 13
Site Templates in SP 13
 
TID Chapter 8 Web Page Development
TID Chapter 8 Web Page DevelopmentTID Chapter 8 Web Page Development
TID Chapter 8 Web Page Development
 
SharePoint 2010 Basics for newbies
SharePoint 2010 Basics for newbiesSharePoint 2010 Basics for newbies
SharePoint 2010 Basics for newbies
 
Web Design Lecture1.pptx
Web Design Lecture1.pptxWeb Design Lecture1.pptx
Web Design Lecture1.pptx
 
SharePoint 2010 Introduction
SharePoint 2010 IntroductionSharePoint 2010 Introduction
SharePoint 2010 Introduction
 
Asp.net
Asp.netAsp.net
Asp.net
 
SharePoint Publishing 101
SharePoint Publishing 101SharePoint Publishing 101
SharePoint Publishing 101
 
Chapter 09
Chapter 09Chapter 09
Chapter 09
 
SharePoint 2007 Presentation
SharePoint 2007 PresentationSharePoint 2007 Presentation
SharePoint 2007 Presentation
 
Share point 2010-uiimprovements
Share point 2010-uiimprovementsShare point 2010-uiimprovements
Share point 2010-uiimprovements
 
Ch 1 Dreamweaver
Ch 1 DreamweaverCh 1 Dreamweaver
Ch 1 Dreamweaver
 
15 asp.net session22
15 asp.net session2215 asp.net session22
15 asp.net session22
 
Metamorphosis from Forms to Java: A technical lead's perspective, part II
Metamorphosis from Forms to Java:  A technical lead's perspective, part IIMetamorphosis from Forms to Java:  A technical lead's perspective, part II
Metamorphosis from Forms to Java: A technical lead's perspective, part II
 

More from techbed

1456.base boot
1456.base boot1456.base boot
1456.base boot
techbed
 
1455.ata atapi standards - 1-7
1455.ata atapi standards - 1-71455.ata atapi standards - 1-7
1455.ata atapi standards - 1-7
techbed
 
1454.ata features
1454.ata features1454.ata features
1454.ata features
techbed
 
1432.encoding concepts
1432.encoding concepts1432.encoding concepts
1432.encoding concepts
techbed
 
Flash cs4 tutorials_2009
Flash cs4 tutorials_2009Flash cs4 tutorials_2009
Flash cs4 tutorials_2009
techbed
 
Photoshop tut
Photoshop tutPhotoshop tut
Photoshop tut
techbed
 
Part 6 debugging and testing java applications
Part 6 debugging and testing java applicationsPart 6 debugging and testing java applications
Part 6 debugging and testing java applications
techbed
 
Lab 7b) test a web application
Lab 7b) test a web applicationLab 7b) test a web application
Lab 7b) test a web application
techbed
 
Lab 7a) debug a web application
Lab 7a) debug a web applicationLab 7a) debug a web application
Lab 7a) debug a web application
techbed
 
What is struts_en
What is struts_enWhat is struts_en
What is struts_en
techbed
 
Part 7 packaging and deployment
Part 7 packaging and deploymentPart 7 packaging and deployment
Part 7 packaging and deployment
techbed
 
Lab 6) package and deploy a j2 ee application
Lab 6) package and deploy a j2 ee applicationLab 6) package and deploy a j2 ee application
Lab 6) package and deploy a j2 ee application
techbed
 
Lab 5b) create a java server faces application
Lab 5b) create a java server faces applicationLab 5b) create a java server faces application
Lab 5b) create a java server faces application
techbed
 
First java-server-faces-tutorial-en
First java-server-faces-tutorial-enFirst java-server-faces-tutorial-en
First java-server-faces-tutorial-en
techbed
 
Part 5 running java applications
Part 5 running java applicationsPart 5 running java applications
Part 5 running java applications
techbed
 
Part 4 working with databases
Part 4 working with databasesPart 4 working with databases
Part 4 working with databases
techbed
 
Part 3 web development
Part 3 web developmentPart 3 web development
Part 3 web development
techbed
 
Lab 4) working with databases
Lab 4) working with databasesLab 4) working with databases
Lab 4) working with databases
techbed
 
Lab 3) create a web application
Lab 3) create a web applicationLab 3) create a web application
Lab 3) create a web application
techbed
 
Part 2 java development
Part 2 java developmentPart 2 java development
Part 2 java development
techbed
 

More from techbed (20)

1456.base boot
1456.base boot1456.base boot
1456.base boot
 
1455.ata atapi standards - 1-7
1455.ata atapi standards - 1-71455.ata atapi standards - 1-7
1455.ata atapi standards - 1-7
 
1454.ata features
1454.ata features1454.ata features
1454.ata features
 
1432.encoding concepts
1432.encoding concepts1432.encoding concepts
1432.encoding concepts
 
Flash cs4 tutorials_2009
Flash cs4 tutorials_2009Flash cs4 tutorials_2009
Flash cs4 tutorials_2009
 
Photoshop tut
Photoshop tutPhotoshop tut
Photoshop tut
 
Part 6 debugging and testing java applications
Part 6 debugging and testing java applicationsPart 6 debugging and testing java applications
Part 6 debugging and testing java applications
 
Lab 7b) test a web application
Lab 7b) test a web applicationLab 7b) test a web application
Lab 7b) test a web application
 
Lab 7a) debug a web application
Lab 7a) debug a web applicationLab 7a) debug a web application
Lab 7a) debug a web application
 
What is struts_en
What is struts_enWhat is struts_en
What is struts_en
 
Part 7 packaging and deployment
Part 7 packaging and deploymentPart 7 packaging and deployment
Part 7 packaging and deployment
 
Lab 6) package and deploy a j2 ee application
Lab 6) package and deploy a j2 ee applicationLab 6) package and deploy a j2 ee application
Lab 6) package and deploy a j2 ee application
 
Lab 5b) create a java server faces application
Lab 5b) create a java server faces applicationLab 5b) create a java server faces application
Lab 5b) create a java server faces application
 
First java-server-faces-tutorial-en
First java-server-faces-tutorial-enFirst java-server-faces-tutorial-en
First java-server-faces-tutorial-en
 
Part 5 running java applications
Part 5 running java applicationsPart 5 running java applications
Part 5 running java applications
 
Part 4 working with databases
Part 4 working with databasesPart 4 working with databases
Part 4 working with databases
 
Part 3 web development
Part 3 web developmentPart 3 web development
Part 3 web development
 
Lab 4) working with databases
Lab 4) working with databasesLab 4) working with databases
Lab 4) working with databases
 
Lab 3) create a web application
Lab 3) create a web applicationLab 3) create a web application
Lab 3) create a web application
 
Part 2 java development
Part 2 java developmentPart 2 java development
Part 2 java development
 

3) web development

  • 1. Vikas Manoria IT Specialist – IBM Academic Initiative [email_address] Section -3) Web Development
  • 2.
  • 3. The Key Views of the Web Perspective 1 4 2 3 5 7 6
  • 4.
  • 5. Web Application - Static • Organizations want to make their information available to as many people in the world as possible. This can be achieved by using the Web, delivering the information as static HTML pages
  • 6. Web Application Evolution - Servlets Applets cannot access data on back-end systems. A Web container can provide server-side components (such as Servlets) to generate dynamic content
  • 7. Web Application Evolution - JSPs Servlets give poor separation between business logic and presentation logic. Use JavaServer Pages and JavaBeans to improve separation
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21. Web Site Navigation Overview 1 2 4 5 3
  • 22.
  • 23.
  • 24.
  • 25. Web Site Details Overview 1 2 3 4 5
  • 26.
  • 27. Add Navigation Elements to Web Pages (2 of 2)
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37.
  • 38.
  • 39.
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51. Web Deployment Descriptor Servlet Settings 1 4 3 2 5
  • 53.
  • 54.
  • 55.
  • 56.
  • 57.
  • 58.
  • 59.
  • 60. Mapping Struts Applications with Web Diagrams
  • 61.
  • 62.
  • 63.
  • 64.
  • 65. Parts of a JSF Application IBM WebSphere Application Server J2EE Enterprise Application JSF Web Application Faces Configuration File Faces Servlet Faces JSP File Component Tree Web Client Managed Beans JSF Libraries/Tags Validators Events
  • 66.
  • 67.
  • 68.
  • 69.
  • 70.
  • 71. Add UI Components to a Faces JSF File 1 3 2 4 5
  • 72.
  • 73.
  • 74.
  • 75.
  • 76. JSF Application Organization and Artifacts 1 2 3 4 5
  • 77.
  • 78.
  • 79.
  • 80.
  • 81.
  • 82.
  • 83.
  • 84.
  • 85.
  • 86.
  • 87.
  • 88.
  • 89.
  • 90.
  • 91. Japanese Hebrew Thank You English Merci French Russian Danke German Grazie Italian Gracias Spanish Obrigado Portuguese Arabic Simplified Chinese Traditional Chinese Thai Korean

Editor's Notes

  1. Main Point: IBM is continuing to evolve and enhance the value that we bring to companies by building on the SOA announcements we made last fall…today we are going to talk to you about how a Business Centric Perspective to SOA is necessary to drive innovation that matters* As you know, SOA is one of IBM’s long term strategies to enable innovation that matters. IBM will continue to deliver SOA centric offerings. But we also want you to know that IBM’s view of SOA is business centric. and we’ll talk about this important concept. Further, we’ll discuss ways to get started through existing parts of your business (people process, information). Additionally, we’ll show how reuse and connectivity is critical to support the business centric approach. We’ll then give you detail on how the specific entry points are accelerated by SOA Foundation products and the business insight these products provide. Lastly, we’ll discuss an important part of the story called SOA Governance to ensure we’re aligning the business with IT.
  2. Notes: Static Web projects are useful when you do not have to program any business logic. This module looks at dynamic projects. Instructor notes: Purpose -- Details -- Additional information -- Transition statement -- There is a wizard for creating dynamic Web projects. You have the choice of setting some options in the wizard.
  3. Notes: You could drag an empty text file into a legitimate point in the project structure, give it the extension you want (for example, .jsp), and work with it. However, the wizards fill the file with the basic structure of the resource type for you. Instructor notes: Purpose -- Details -- Additional information -- Point out that it is best to right-click the folder where you want the resource to be created and select New, because this will (1) ensure that the resource you want to create can be added to this folder, and (2) limit the options to relevant resources. Transition statement -- We shall look at two wizards, HTML and JSP; first the simpler HTML page wizard.
  4. Notes: Configurations group together a collection of facets. Facets add functionality to your projects (for example, project builders, style sheets, and included JAR files). Note the Dynamic Web Project with XDoclet configuration choice. XDoclet allows you to embed tags directly in your source code to generate extra code. For example, you can use the @web.servlet tag to indicate the deployment information for a servlet. The tags are then used to add deployment information to web.xml. This course will use the standard builders from Rational Application Developer V7.0 and later and not the XDoclet technology. Instructor notes: Purpose — Details — Additional information — Transition statement — Next: Create Web Project Wizard (2 of 3)
  5. Notes: Project facets allow you to add and remove functionality from a project. In this case, the project can be deployed as an EAR to an IBM® WebSphere® Application Server v6.1. You can select a facet to display a description. You can right-click a facet and Show Constraints to show the other facets that it depends on. You can also click on Show Runtimes to display the available runtimes. You can add and remove project facets using the Properties dialog of a project. Instructor notes: Purpose — Details — Additional information — Transition statement — Next: Create Web Project Wizard (3 of 3)
  6. Notes: Instructor notes: Purpose — Details — Additional information — Transition statement — Next: Create Servlet Wizard (1 of 3)
  7. Notes: Templates can define a common look and feel for a Web site (or groups of pages in a site). To create a new Web page template, complete the following steps: In the Project Explorer, right-click the folder in which you want to create the template, and then click New &gt; Web Page Template . The New Web Page Template window appears. Type the name of the file. You can optionally change the folder name in the folder field. Select either a Design-time template or a dynamic template. Select a template from the list of templates. You can preview most of the templates in the preview box. Optionally, clear the Link page to template check box. If you clear this box, you will be able to edit every part of the template in Page Designer. (In other words, if you clear this box, you are essentially making a copy of the page template for the new page). If you select this box, you will only be able to edit the content area of the template in Page Designer. Click Finish . The template appears in Page Designer. Add elements to the newly created page template. The common area is the part of the template that appears in each page that uses the template. The entire template is a common area by default; once you add a content area, the common area is the area surrounding the content area. To create a page template from an existing file: In Page Designer, open the existing HTML or JSP file that you want to be a page template. Insert a content area in the page. To insert a content area, open the Page Template drawer on the palette, drag a content area to the page, and then add content to the content area. When you save the file, it is automatically saved as a template. Before you can use templates, they must have designated content areas. These areas can be added from the palette, in the page template section. These content areas define the insertion points for pages that use the template. Design-Time Template content seen in pages will be treated as read-only; only the material found in the content area is editable. To edit anything in the Design-Time template, you must change the template by editing it directly. Pages using Dynamic Templates will not show the Dynamic Template content; only the Tiles taglib usage of the Dynamic Page Template will show in the page. See the next slide for more information on the differences between Design-Time and Dynamic Page Templates. Instructor notes: Purpose -- Details -- Template files can created anywhere inside of the WebContent folder, although a common directory could be WebContent/theme folder. The template file can be modified directly by editing it. Note that all code is used from the template file. Even tags such as &lt;HTML&gt; and &lt;BODY&gt; become read-only in the destination file. Additional information -- Transition statement -- How do we work with a page template?
  8. Instructor notes: While designing a web site or web application, you start to see common layout elements in different pages. Templates allow you to capture these common elements. Also the front end is what clients see, thus there is a lot of churn and updates required. Changing the template updates the pages. Purpose -- Details -- Additional information -- Transition statement --
  9. Notes: The main project folder contains all of the development objects related to a Web application. The WebContent folder contains the elements of the project necessary to create a Web application. This folder structure maps to the Web application archive (WAR) structure defined by the J2EE specifications. Instructor notes: Purpose -- Details -- For the WAR Directory Structure, the specification tells us that the top-level directory is the document root of the application. This corresponds to the WebContent folder in Rational Application Developer. Resources held outside of this folder (such as Java source code) are not part of the WAR file. Additional information -- Transition statement -- We shall take a closer look at the structure of the document root: the WebContent Folder.
  10. Notes:   Instructor notes: Purpose -- Details -- Highlight the fact that all files under the WebContent folder become part of the WAR file when you export the Web project. The compiled Java class files from the Java Resources folder are placed in WebContent/WEB-INF/classes. Additional information -- Ask students whether this image is of a dynamic or a static project, and why (dynamic). Point out that `Web Deployment Descriptor&apos; is a shortcut that points to the web.xml file in the WEB-INF folder.   Transition statement -- The document root includes a subdirectory called WEB-INF.
  11. Notes:   Instructor notes: Purpose -- Details -- Additional information -- Here is a brief explanation of the function of each resource: web.xml: The Web application deployment descriptor classes: Server-side classes: servlets, utility classes, and JavaBeans components lib: JAR archives of libraries (tag libraries and any utility libraries called by server-side classes) ibm-web-bnd.xml and ibm-web-ext.xml: WebSphere-specific extensions to the J2EE specifications. MyJSP.jsp: a JSP file that is not visible from a browser. There could also be Tag library descriptor files.   Transition statement -- web.xml is the deployment descriptor file. It has its own editor.
  12. Notes: Even though the Web deployment descriptor editor does provides a source page of the web.xml file (from the Source tab), using the tabbed pages is easier and introduces fewer errors. Instructor notes: Purpose -- Details -- Additional information -- Open Rational Application Developer and show each tab with brief explanations: Overview: provides a quick summary of the contents in the Web deployment descriptor and lets you add, remove, or change the contents. Servlets: Create a new servlet, add an existing servlet or JSP file to the deployment descriptor, or remove the selected servlet of JSP file from the deployment descriptor. Filters: Create a new filter, add an existing filter to the deployment descriptor, or remove the selected filter from the deployment descriptor. Security: lets you define security roles and security constraints. References: Add or remove references to the deployment descriptor. The following are the types of references you can define on this page: EJB reference: create a reference to an enterprise bean. Service reference: create a reference to a Web service Resource reference: create a reference to an external resource Resource Environment reference: create a reference to administered objects. JSP Tag Library WS Handler: Add and configure handlers for a selected port component. This includes specifying a handler description and display name, specifying implementation details, adding initial parameters, and adding SOAP headers. Pages: Add or remove welcome and error pages to the deployment descriptor. Also, allows you to define the login-config element and add exception types to error pages. Variables: Add or remove listeners, environment variables, tag lib references, context parameters and MIME Mappings. WS Extensions and WS Bindings: Configure extension and binding information for the Web service. Extensions: Specify settings for WebSphere extensions (such as enabling reloading). Other settings include MIME filters, JSP attributes, file serving attributes, invoker attributes, and servlet caching configurations.   Transition statement -- You can also update the deployment descriptor in the source tab.
  13. Notes: This slide shows the source code for the deployment descriptor. Instructor notes: Purpose -- Details -- Additional information -- To demonstrate how updates in a tab are reflected in the source code, and vice versa, add a servlet in the servlet tab then examine the code in the source tab. Transition statement -- Next: Checkpoint Questions
  14. Notes: When you add or remove pages from the Web Site Navigation, the Web Site Designer automatically generates updated navigation links. The designer inserts special comments tags to denote the navigation bar and site map in the Web site. These comment tags are placeholders for the actual links, generated from the Web site navigation metadata file .website-config. Instructor notes: Purpose -- Describe the function of the Web Site Designer. Details -- The Web Site Navigator link is available in both static and dynamic Web projects. Additional information -- The Web Site Navigation link in the Project Explorer opens the Web Site Designer Editor. The term Web Site Navigation is used specifically in this unit to describe the visual navigation diagram in the Web Site Designer. For simplicity, you can explain to students that Web Site Navigation and Web Site Designer are the same feature in IBM Rational Application Developer V7. Transition statement -- What are the views that make up the Web Site Designer?
  15. Notes: The Web Site Navigation editor (its various frames numbered in the previous figure and detailed following) allows you to design the site navigation from the main welcome page to the to the rest of the site. The navigation editor also allows you to apply or change the style sheet, and the page template, and specify the file location. You can also open any page listed in the Web Site Navigation for editing. The Pages to add drawer lists all Web pages available in the Web project. Drag Web pages from your dynamic Web project into the Web Site Designer editor. The Palette view allows you to add new or existing Web pages to the Web site diagram. The Properties view provides additional information on the entire site, or individual pages listed in the Web site diagram. Use the Site template setting to apply a site-wide page template, enforcing a uniform look and feel. Instructor notes: Purpose -- Provide a brief overview of the Web Site Designer editor, the Palette view and the Properties view. Details -- Additional information -- A drawer is a UI element that can reveal or hide itself. The Pages to Add drawer can be hidden by pressing the right-pointing triangle on the right edge of the drawer. The Site drawer in the Palette view can be minimized by clicking the name Site. The pushpin icon to the right of the label &amp;quot;Site&amp;quot; ensures that the items within the Site drawer do not become hidden. Transition statement --
  16. Notes: You can also realize a Web page by double-clicking the resource in the Web site designer. If the Web page is already associated with a resource, double-clicking the page opens it in the Page Designer. Instructor notes: Purpose -- Describe the steps needed to create a relationship between two pages in the site hierarchy. Details -- The Navigation tab in the Web Site Designer visualizes a Web site in a hierarchy or tree format. Each page in the Web site represents a node in the hierarchy. Like a tree structure, every page in the diagram has one of two relationships: Parent-child relationship describes a link from one Web page to another. The page with the link is the parent, while the page specified by the address is the child. A line connects the parent and child. Consecutive sibling relationship describes two pages that have the same parent page. For example, an index page has links to the company and contact us pages. The company and contact us pages are deemed to be siblings. Pages can also appear on their own, without any relationship to other pages. This type of page icon appears for recurring links that appear in every page, such as a privacy policy or copyright statement page. Additional information -- The general idea is to sketch the Web site hierarchy in the Web Site Designer editor first. Realize each page by linking each page icon to an actual page or create a new page for the icon. Rearrange the page icons as necessary. The site navigation links and site map are automatically arranged according to the settings in the Navigation view. Transition statement -- How about describing links to Web resources outside of the Web project?
  17. Notes: Double-clicking an external site opens a Web browser on the site address. For non-Web page resources, the application that is opened depends on the protocol. Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  18. Notes: In the diagram above, the pages in the Utilities group are consecutive siblings to each other forming a logical organization of pages. Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  19. Notes: The Details view (with elements numbered in the previous slide and detailed following) allows you to inspect or modify common file attributes. Site parts will use information found in the details view to determine whether a specific page should be shown in a navigation area or in a site map. The flags navigation candidate and site map candidate are used for that purpose. The Details tab provides additional information about the pages in the Web site diagram in a table format. The Page type identifies the type of file associated with the navigation label. The Show in navigation check box indicates whether the page appears in the navigation bar. The Show in site map check box indicates whether the page appears in the generated site map. Selecting Navigation root makes the currently selected page the first level of the generated site navigation links. Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  20. Notes: The best practice is to add the navigation elements in a standard Web page, such as a Page Template. Apply the Page Template to all Web pages in the Web site for a uniform look and feel. Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  21. Notes: Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  22. Notes: If you have not previously added the Web page to any Web diagrams in the project, the workbench prompts you to select which Web diagram file to use. The default Web diagram file is /WebDiagram.gph in the root directory of the Web project. Instructor notes: Purpose -- Describe the steps in adding a Web page from the Web Site Designer into a Web diagram. Details -- Additional information -- The blue gradient in the page icon indicates that the associated Web page is a dynamic element, such as a JSP page. A static HTML page icon is a white rectangle with a black outline. Transition statement -- Once you have added Web pages into the Web diagram, how do you connect two pages together?
  23. Notes: In the above diagram There is a Struts Form link from login.jsp to the /Login Struts action. The login.jsp page contains a form with the action /Login. There is a hyperlink from the error.jsp to login.jsp. Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  24. Notes: HTML Frameset : An HTML document that describes frame layout (called a frameset document ). It has a &lt;HEAD&gt; section and a &lt;FRAMESET&gt; section (no &lt;BODY&gt; ). Compact HTML : A derivative of HTML used for mobile devices. XHTML : A reformulation of HTML 4.0 as an application of XML. WML : A markup language based on XML that is used to present content and user interfaces for wireless devices such as cellular phones, pagers, and personal digital assistants. Instructor notes: Purpose -- Details -- Additional information -- If you have not checked `Create from page template` the advanced options available are: Encoding: The default (ISO Latin-1) is the value set in Window -&gt; Preferences-&gt; Web and XML Files -&gt; HTML Files. Content Type: The default is text/html. Document Type: HTML 4.01 Transitional (the default) or Strict (which excludes the presentation attributes and elements). Cascading stylesheet (CSS) file: Remove the default Master.css, or add other CSS files.   Transition statement -- Next: The JSP Wizard
  25. Notes: The choice of markup languages is the same as for HTML pages. The XML-style syntax box is enabled if the markup language is XHTML or WML. Enabling a Struts JSP will add tag libraries (struts-html and struts-bean) to the source code. It will also replace the basic &lt;HTML&gt; tag with an &lt;html:html&gt; tag. Enabling a Faces JSP will add the Sun Faces core tag library to the source code. It will add a &lt;f:html&gt; tag enclosing the HTML &lt;body&gt; tag. Instructor notes: Purpose — Details — Additional information — Advanced options are more complex for JSPs: Tag libraries : Add libraries. The next page has the identical options as the HTML wizard. Method stubs : Create init() or destroy90 methods. Also you can choose to add the file to web.xml, which will add the JSP name to the servlets list. Transition statement — Next: JSP Page Syntax and Document Syntax
  26. Notes: Instructor notes: Purpose — Details — Additional information — Transition statement — Next: The Use of the Design, Source and Preview tabs
  27. Notes: There are typically 7 drawers: HTML, Form, JSP, Crystal Reports, Page Template, Data, and Web Site Navigation. Most of the selections are also available from the Insert menu or the JSP menu. Other drawers may be available for Struts tags In the example, an Image is being dragged to the middle of the JSP. Instructor notes: Purpose — Details — Additional information — Transition statement — Next: Inserting JSP Custom Tags
  28. Notes: An element such as Background music, for example, is not rendered in design mode. The music file (.mp3, .wav, and so on) is added to the project. This can increase the project size enormously, especially with .wav files. If you add several music files to the background, they execute simultaneously. Instructor notes: Purpose — Details — Additional information — Transition statement — The Insert menu includes items that might be necessary in any HTML page. In a JavaServer page, there are other options that are available in the JSP menu.
  29. Notes: Instructor notes: Purpose — Details — Additional information — Underline the first bullet on this page: this menu is not available if the file in the active editor is not JSP. Transition statement — The options we have just seen in the menus are also available in the drawers of the palette view.
  30. Notes: The Insert Custom menu item launches the Insert Custom Tag dialog. It shows all custom tags available to that page (ones included via taglib directives). Instructor notes: Purpose — Details — Additional information — Note that if you try to insert by dragging from the palette view, any tag libraries you Add... will only be available if you close the dialog and reopen it... Transition statement — Next: Modifying Tag properties in the Properties view.
  31. Notes: The tabular view shows all attributes of the selected resource. The graphic view shows only a few properties. The grey bar at the left shows how the selected resource fits into the tree. The &lt;B&gt; tag has been selected (bold text). The text is in a data cell, which is part of a row which is itself part of a table. Furthermore, the table is part of a form, all of which has been created in the &lt;BODY&gt; of the page. The properties displayed will change according to which resource is selected, and clicking a label in the grey bar will change the selection in the design or source view. Instructor notes: Purpose — Details — Additional information — Transition statement — Next: Adding Variables to the Page Data View
  32. Notes: The image shows the available context pop-up menu for Use Bean. Instructor notes: Purpose — Details — Additional information — Transition statement — Next: Editing JavaScript in the Quick Edit View
  33. Notes: Select a tag in a JSP or HTML file, select an event in the Quick Edit event list pane, right-click the Quick Edit editor and select a script. Here is a simple example: onmouseover &gt; Jump to the specified URL: Inserted at the point the mouse will roll over (a table data cell in this instance): &lt;TD onmouseover=&amp;quot;return func_1(this, event);&amp;quot;&gt; Inserted into the &lt;HEAD&gt;: &lt;SCRIPT type=&amp;quot;text/javascript&amp;quot;&gt; function func_1(thisObj, thisEvent) { _JumpURLinNewWindow(&amp;quot;http://MyServer/MyFile&amp;quot;); }&lt;/SCRIPT&gt; &lt;SCRIPT type=&amp;quot;text/javascript&amp;quot;&gt; function _JumpURLinNewWindow(url) { if (url != &amp;quot;&amp;quot;) { window.open(url, &apos;_blank&apos;); } } &lt;/SCRIPT&gt; Instructor notes: Purpose — Details — The nice thing about the Quick Edit view is that you can add scripts that are accurately coded even when you don’t remember (or never knew) the syntax. The code given in the student notes is a good example. You should run through the code in Rational Application Developer before presenting this unit, then give a live demonstration of the changing image. Expand on the idea to swap two images when the mouse moves into and out of a table data cell. Additional information — Transition statement — Next: The Cascading StyleSheet Wizard
  34. Notes: Instructor notes: Purpose — Details — Additional information — Transition statement — Next: Editing CSS Files in the CSS Designer
  35. Notes: Any change you make in the code to the right is reflected visually in the left pane. Here, the color of the font has been set to 66-00-00 and the family to Arial. Both of these changes are previewed in “Style of H1” to the left. Any open file that uses this CSS will also pick up the changes. A line is being inserted using content assist, showing all the possible choices to complete the word font. Note that if there is more than one stylesheet referenced in the JSP or HTML code, their style definitions is combined. If there is a conflict, it is the last-referenced stylesheet that will be applied. Instructor notes: Purpose — Details — Additional information — Transition statement — Next: Defining Styles Using the Styles View
  36. Notes: The file template.jtpl has focus. Files to the left are making reference to this file. Files to the right are referenced by template.jtpl. Link to a file outside the Web content folder. There are two references to this gif in template.jtpl The validity of the link cannot be verified. The file referenced by template.jtpl itself references other files. Clicking the ‘-&apos; collapses this part of the tree. Right-clicking a file and selecting the item “Become new center&apos; moves focus from template.jtpl to this file (template will now be a file to the left which references the new file). Instructor notes: Purpose — Details — Additional information — [TODO: The following content could not be copied correctly to PPT, since it contains screen captures of the icons] Other icons: A link is to a cascading stylesheet: A link is to a graphic. Links to graphics are sometimes referred to as an embedded links because they are rendered as part of the same HTTP request (appear on the same page): A link is one of a number of industry standard link types: A link is to a mailing address: A link to file types that are not recognized: Transition statement — Next: Configuring Pages in the Deployment Descriptor
  37. Notes: By default, Rational Application Developer generates a list of six default Welcome pages. You can remove any or all of them, and add any other. Clicking Add for Error Pages brings up a list of standard error codes (100 through 505). Instructor notes: Purpose — Details — Additional information — The pages are not created simply by listing them here. This is an error that many students make! It should be explained clearly that the developer first needs to create any page that is required, then link the page to a specific scenario (welcome or error). Transition statement — Next: Checkpoint Questions
  38. Notes: You only need to perform one of the two methods described in this slide. Both methods will open the new servlet wizard, covered in the next slide. There is no advantage in following one method over another. Instructor notes: Purpose -- Explain how to invoke the Create Servlet wizard. Details -- Additional information -- There are additional ways to create servlets, such as through the Web perspective toolbar. At this point, merely impress upon the student that there are two main ways to start the Create Servlet wizard. Transition statement -- What options does the Create Servlet wizard provide?
  39. Notes: By default, the folder name is set to the dynamic Web project&apos;s JavaSource folder. The class name matches the servlet name (to be defined in the Web deployment descriptor) and the superclass is javax.servlet.http.HttpServlet. Annotations and XDoclet will be covered in the Annotations and XDoclet module. Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  40. Notes: Adding initialization parameters, adding URL mappings, defining an existing servlet class, and generating annotated servlets are optional settings. At a minimum, the Create Servlet wizard only requires a servlet name. If you want the servlet to be accessible by a Web client, you must define a URL mapping for the servlet. Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  41. Notes: You cannot set the modifiers to be both abstract and final, because abstract classes must be extended but final classes cannot be extended. Once the servlet is created, there will be a warning that it should define a serialVersionUID field because it implements java.io.Serializable. Use Quick Fix to Add generated serial version ID . Instructor notes: Purpose -- Details -- Additional information -- Transition statement -- The settings for the Create Wizard servlet should be familiar to most people, except for the new annotated servlet class setting. Let&apos;s examine that option in greater detail.
  42. Notes: The Project Explorer view combines a logical view with the actual file contents of the Web project. The deployment descriptor branch represents sections within the web.xml file, located in the WebContent/WEB-INF folder. The Java Resources folder does not physically exist in the Web project files either. Only the scr folder appears under the Web project folder on your file system. Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  43. Notes: The Servlets section within the Web deployment descriptor allows you to declare and configure each servlet and JSP in the Web project, as numbered in the previous figure and detailed following: The Servlets and JSPs section lists all servlets and JSPs declared in the current Web project. The Details section allows you to specify a Java class representing the servlet and additional information. The URL Mappings section lists one or more URL address patterns that correspond to the current servlet. The Initialization section maintains a list of configuration parameters, stored as name and value pairs. The Load on Startup check box sets whether a servlet should be loaded when first used or during server startup. Not shown are Security Role References , for setting J2EE security for the Web resource. For more information on Web application security, refer to the security unit in this course. Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  44. Notes: The Source tab in the Web deployment descriptor editor shows the actual XML content in the web.xml file. The example in the slide matches the settings in the Servlets tab. The comment sections denote the information that was generated by the annotations. Information in the Servlets tab reflects any changes made in the source editor. Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  45. Notes: Struts 1.0 was released in June 2001 Code was donated to the Apache Software Foundation in 2000 Incorporated into the Apache Jakarta project The name &amp;quot;Struts&amp;quot; is a reference to architectural struts, a &amp;quot;structural element used to brace or strengthen a framework&amp;quot;. The Apache FAQs define it as &amp;quot;a reminder of the nearly invisible pieces that hold up buildings, houses, and bridges.&amp;quot; The Jakarta Project (http://jakarta.apache.org) creates and maintains open source solutions on the Java platform. Significant Jakarta projects include: Ant: A Java-based, cross-platform tool for creating automated builds, including compiling code, bundling applications, and preparing the environment Bean Scripting Framework (BSF): Provides scripting language support within Java applications, and access to Java objects and methods from scripting languages Cactus: A framework for unit testing server-side J2EE components, such as servlets and EJBs Log4j: A logging library which allows developers to easily add logging to Java applications. Taglibs: A collection of open-source JSP tag libraries. Tomcat: A reference implementation of the servlet and JavaServer Pages (JSP) specifications. POJO stands for Plain old Java object and it implies that you are using an ordinary Java object that is not required to extend any special framework classes, or to implement any framework interfaces. Instructor notes: Purpose -- Details -- As of July 2007, Struts 2.0.9 is the latest production release of Struts. Additional information -- Transition statement -- Struts is often referred to as an MVC framework. What does this mean?
  46. Notes: The Struts framework control layer uses technologies such as servlets, JavaBeans components, and XML. The View layer uses JSPs. Instructor notes: Purpose -- To show how Struts conforms to the MVC paradigm. Details -- Additional information -- The important point here is that Struts does not include the model. How the data is manipulated is entirely up to the developer, and the Struts framework will do no more than send the command and data to the model, then pass the returned data back to the Struts controller. Transition statement -- The Struts Framework works blindly in a sense. It takes data and hands it to the model; it takes the return values and hands them to a JSP. Often there are other things you want to do. For the input, you may need to do some complex validation of the data. For the output, we may want to build a more complex page than a simple JSP. Struts has extensions that can help.
  47. Notes: Struts has a plug-in structure, so it is possible for developers to create their own extension to Struts. Instructor notes: Purpose -- To describe two common extensions to the Struts framework Details -- From the Apache Software Foundation Struts Tiles Guide: Tiles builds on the &amp;quot;include&amp;quot; feature provided by the JavaServer Pages specification. Screen definitions Create a screen by assembling Tiles (for example, header, footer, menu, and body). Definitions can take place: In a centralized XML file Directly in JSP pages In Struts Actions Definitions provide an inheritance mechanism: a definition can extend another one and override some (or all) of its parameters. Layouts Define common page layouts and reuse them across your Web site. Define menu layouts and pass lists of items and links. Define a portal layout, use it by passing lists of Tiles (pages) to show. Reuse existing layouts, or define your own. Internationalization (I18N) It is possible to load different Tiles according to the user&apos;s Locale. A mechanism similar to Java properties files is used for definition files: you can have one definition file per Locale, the appropriate definition is loaded according to the current Locale. Additional information -- Transition statement -- What benefits can we expect by using Struts?
  48. Notes: These objects can be created with wizards: JSPs, struts-config.xml, ActionForm, and Action. A ResourceBundle can be generated automatically with the project. Tiles are created by adding the appropriate custom tag library to a JSP. Other components that can be generated using wizards: ActionMapping A Struts configuration file entry that associates an action name with an action. It can contain a reference to a form bean that the action can use, and may define a list of local forwards that is visible only to this action. Struts Exception An element defined in a Struts configuration file that specifies how to handle Java exceptions that occur during execution of Struts actions. You can define an exception handler to run when an action&apos;s execute method throws an exception. Instructor notes: Purpose -- To show which components can be created with wizards. Details -- Additional information -- Underline the fact that the ActionServlet and RequestProcessor will be created automatically at runtime. If developers need to add custom code to the RequestProcessor, they can create a subclass. Transition statement -- All these components need to live in a project! How do we create a Struts-Enabled Project?
  49. Notes: The Struts level for projects is V1.1 and later. Instructor notes: Purpose -- To show how to enable a project for Struts. Details -- Additional information -- Note in particular that it is not possible to remove Struts support automatically. You could of course go through the project and remove the resources manually. Transition statement -- A single module for Struts development is probably sufficient if there is only one person or one team creating the project. If there are more than one, chances are that configuration information will get overwritten if there is only one module. Because of this, Struts 1.1 and later provides the possibility of creating several Struts modules in one project.
  50. Notes: The Struts framework supports multiple application modules in Struts 1.1 and later . All applications have at least one (default) module which has no name. Developing a Struts 1.1 application with only a default module is the same as developing an application in Struts 1.0. Instructor notes: Purpose -- To introduce the concept of modules. Details -- Additional information -- Transition statement -- Modules have to be associated with a project.
  51. Notes: The default module has the param-name config . Other modules are associated with this one by giving them the subcontext config/ NewModule . Instructor notes: Purpose -- To show how modules are associated with a project. Details -- Additional information -- Make it clear that there are two configurations being referred to on this slide: the Struts configuration file (struts-config.xml, and so on) and the Web deployment descriptor (web.xml).   Transition statement -- Next: Mapping Struts Applications with Web Diagrams
  52. Notes: This screen-shot shows the palette of the Web diagram editor. You can create the following web parts: Struts Action Action Input Local Forward Local Exception Form Bean Struts Global Node Global Forward Global Exception Web page HREF Link Struts Form Struts Link Data And the following page data elements: Bean Relational Record Relational Record List Domino Note Domino View Instructor notes: Purpose -- A brief demonstration of how the Web diagram editor can be used to create Struts objects. Details -- Additional information -- Ask students why there are only three Struts objects that can be placed on the diagram. ANSWER: The other resources are referenced or defined when realizing the Action mapping. For example, global-exception, global-forward, forward, message-resource. Transition statement -- Next: Struts Versions and Tolerance
  53. Notes:   Instructor notes: Purpose -- To make students aware of the Struts Explorer view. Details -- Additional information -- Transition statement -- Next: Examining the Struts Configuration File
  54. Notes: If there is just one Struts configuration file, its default name is struts-config.xml. To take effect, a Struts configuration file must be referenced from the Web deployment descriptor (web.xml file) for the configured Struts action servlet. The Struts configuration file contains the following categories of information: Data sources Form beans Global exceptions Global forwards Action mappings Message resources Instructor notes: Purpose -- To show how configuration files are related to the project. Details -- Additional information -- Transition statement -- Next: A Closer Look at the &lt;action-mappings&gt; Tag
  55. Notes: The name of the ActionForm that will hold the data from the browser form. The request that calls this ActionForm and Action is identified in the part of the URL preceding the .do. The fully qualified name of the Action bean that will be invoked for this request. The page that will be returned to the browser if validation fails in the ActionForm. After the model has handed back a result to the Action bean, there can be two results. Others can be added. The JSP to be invoked according to the result (in this instance, success or failure). Instructor notes: Purpose -- To examine the source code of a Struts configuration file. Details -- Additional information -- Take care to explain the &lt;action-mapping&gt; tag attributes in some detail on this slide. There will be a checkpoint question on the input attribute. Transition statement -- Next: Checkpoint Questions
  56. Notes: JavaServer Faces (JSF) technology provides an application programming interface and reference implementation for adding and configuring user-interface elements in a Web application. JSF technology also provides a custom tag library to express user interface components in a JSP page. Instructor notes: Purpose -- Details -- The description of JSF as a &amp;quot;user interface framework&amp;quot; rather than an &amp;quot;application framework&amp;quot; is chosen because of JSF&apos;s focus on developing a component model for the user-interface, or view layer, of the application architecture. This is in contrast to the focus on the controller or model layers of the application architecture in application frameworks like Struts. This distinction is supported by the JavaServer Faces FAQ: http://java.sun.com/j2ee/javaserverfaces/faq.html#differences   The JavaServer Faces specification was created through the Java Community Process (JCP). The JCP allows the Java developer community to participate in the development of standards. The Web site for JavaServer Faces&apos; Specification Request is available at: http://www.jcp.org/en/jsr/detail?id=127   This Web site contains the JavaServer Faces specification, contacts for the specification leads, and links to additional resources Additional information -- Transition statement --
  57. Notes: A generic controller servlet known as FacesServlet receives JSF page requests and controls the execution flow. The Faces JSP page uses JSF components to render UI elements and handle events. Managed beans represent the data model and transfer information between the business logic and JSF components. JSF Libraries and Tags provide the implementation for JSF components. Validators perform simple data format and range checks before passing the information to the business logic. Events execute Java code; they are used to pass data from the managed beans to the business logic. An XML configuration file (faces-config.xml) contains navigation rules between Faces JSP pages, validators, and managed beans. Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  58. Notes:   Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  59. Notes: To enable JavaServer Faces technology for an existing Dynamic Web Project Right-click the project and select Properties Select the Project Facets node Click Add/Remove Project Facets in the Project Facets panel Select the following Project Facets Base Faces Support Enhanced Faces components JSTL Click Finish and then click OK . Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  60. Notes: The Faces JSP File wizard interface is almost identical to the standard JSP File wizard, except for the inclusion of the JSF tag library. However, the Faces JSP File wizard creates more artifacts than the JSP File wizard. Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  61. Notes: SDO: Service Data Object. Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  62. Notes:   Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  63. Notes: Arrange JSP components within the Page designer editor. Drag JSP components from the Faces Components drawer into the JSP file. Bind JavaBean values to input and output fields in the JSP file. The Outline view displays hierarchy of JSP tags in the JSP file. The Properties view displays configuration options for the selected JSF UI element. Instructor notes: Purpose -- Details -- The JSF UI component architecture is decoupled from the actual rendered component that the user sees in the interface. The renderer is a separate object that can be plugged into the component, depending on the requirements of the client platform. This way, the same view can be rendered in full HTML for a Web browser client, WML for a handheld device, and so on.   A description of how rendering works in a JSF application is provided in Chapter 8, &amp;quot;Rendering Model&amp;quot;, of the JSF specification.   Only an HTML renderer is provided with JSF at this time. Additional information -- Transition statement --
  64. Notes: You can design pages using only standard JSF tags and features. None of IBM&apos;s components would be used in this mode.   Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  65. Notes: Standard components have been removed from the palette in the above image
  66. Notes: Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  67. Notes: The pop-up menu within the Quick Edit area provides snippets for programming JSF actions. Instructor notes: Purpose -- Details -- Code to handle button actions or value changed events is added to the Page Code class through the Quick Edit view. Developers do not have to use the Quick Edit view if they don&apos;t want to. Instead, they can directly modify the page code class by double-clicking the Page Code class in the Project Navigator view to open it in the editor, or by right-clicking a component in the Faces JSP File and selecting Edit Page Code from the pop-up menu. Additional information -- Transition statement --
  68. Notes: Navigation rules created in the Web Diagram editor are added in the Faces configuration file. Additional methods supporting JSF components are written in the pagecode class, including actions written in the Quick Edit view. IBM JSF JAR provides support for JSF tools, including the JSF tag libraries. The Faces configuration file is automatically added when the wizard creates the first Faces JSP file. The Faces JSP file is a regular JSP file using JSF tag libraries. Instructor notes: Purpose -- Details -- The Faces Servlet is provided with the JSF runtime, and must be declared in the Web Deployment Descriptor: &lt;servlet&gt; &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt; &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt; &lt;/servlet&gt; The Web Deployment Descriptor also includes a Servlet Mapping, which maps all requests for a JSF application&apos;s resources to the Servlet. In most applications, all requests for URLs with resources beginning with &amp;quot;/faces/&amp;quot; will be routed through the Faces Servlet: &lt;servlet-mapping&gt; &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt; &lt;url-pattern&gt;/faces/*&lt;/url-pattern&gt; &lt;/servlet-mapping&gt; Rational Application Developer will add these declarations to the Web deployment descriptor automatically when the first Faces JSP file is added to the project. Additional information -- Transition statement --
  69. Notes: Code to handle button actions or value changed events is added to the Page Code class through the Quick Edit view. The methods in the Page Code class are called when these events are triggered at runtime. Page Code event handler methods typically call on other objects (JavaBeans, Enterprise JavaBeans) to interact with the persistence layer (such as a relational database, or an enterprise information system). To edit the Page Code class directly, instead of through the Quick Edit view: Double-click the Page Code class in the Project Navigator view to open it in the editor. Right-click a component in the Faces JSP File and select Edit Page Code . Instructor notes: Purpose -- Details -- Additional information -- Transition statement --
  70. Notes : Write down your answers here: Instructor notes : Purpose — Details — Additional information — Transition statement —
  71. Notes : Write down your answers here: Instructor notes : Purpose — Details — Additional information — Transition statement —
  72. Notes : Write down your answers here: Instructor notes : Purpose — Details — Additional information — Transition statement —
  73. Notes : Write down your answers here: Instructor notes : Purpose — Details — Additional information — Transition statement —
  74. Notes: What is Struts? Struts is involved in which parts of the MVC architecture? Name an extension to the Struts framework. Which are the controller components in Struts? How many configuration files are there in a Struts project? Which versions of Struts are supported by Rational Application Developer? In the following code, what is the purpose of the input attribute? &lt;action name=&amp;quot;loginForm&amp;quot; path=&amp;quot;/login&amp;quot; scope=&amp;quot;request&amp;quot; type=&amp;quot;com.ibm.LoginAction&amp;quot; input=&amp;quot;/welcome.jsp&amp;quot;&gt; http://struts.apache.org/1.x/struts-core/dtddoc/struts-config_1_0.dtd.html#action
  75. Notes : Write down your answers here: Instructor notes : Purpose — Details — Additional information — Transition statement —
  76. RUP Rational Unified Process, Developer Tab , Designer &gt; Concepts &gt; J2EE to RUP Mapping Rational Unified Process, Developer Tab , Designer &gt; Enterprise JavaBean (EJB) Design &gt; Guideline s &gt; Designing Enterprise JavaBeans (EJBs) Web Resources http://www-130.ibm.com/developerworks/ http://w3.ams1.ibm.com/services/ams/competency/ams/tools_support/rational/learn_about/ams_rational_advanced_learning.html EJB Best Practices: Entity Bean Protection: http://www-106.ibm.com/developerworks/java/library/j-ejb1008.html Literature Enterprise Java Programming with IBM® WebSphere®, Second Edition By Kyle Brown, Gary Craig, Greg Hester, Russell Stinehour, W. David Pitt, Mark Weitzel, Jim Amsden, Peter M. Jakab, Daniel Berg Additional Courses Introduction to Web Services - http://w3-3.ibm.com/education/CourseDescriptionServlet.wss?city=&amp;state=&amp;countrycode=&amp;coursecode=XM371&amp;courseDescrLanguageId=1 WebSphere Training and Technical enablement: http://www-128.ibm.com/developerworks/websphere/education/enablement/curriculum/cur_webtoolside.html Review resources with students and answer questions.
  77. Self explanatory