SlideShare una empresa de Scribd logo
1 de 25
In this session, you will learn to:
Describe web applications
Describe Java Platform, Enterprise Edition 6 (Java EE 6)
Describe web application program execution methods and the
advantages and disadvantages of each
Describe Java servlet technology
Describe JavaServer Pages technology
Define three-tier architecture
Define Model-View-Controller (MVC) architecture
Objectives
HTML over HTTP
Common Gateway Interface (CGI)
Servlets
JavaServer Pages (JSP) technology
JSP Standard Tag Library (JSTL)
XML
Struts
JavaServer Faces
Web Application Technologies
Java™ EE 6
Java EE is the industry standard for developing portable,
robust, scalable and secure server-side Java applications.
Java EE is built on the solid foundation of Java Platform,
Standard Edition (Java SE).
Java EE is a set of coordinated technologies which includes
the following web application technologies:
Java Servlet 2.6 (Java Specification Requests [JSR] 164)
JavaServer Pages 2.1 (JSR 246)
JavaServer Pages Standard Tag Library (JSR 62)
JavaServer Faces 1.2 (JSR 262)
Java™ EE 6 (Contd.)
For a complete list of Java technologies, go to:
http://java.sun.com/javaee/technologies/
http://java.sun.com/javase/technologies/
Java EE 6 SDK
Web Sites and Web Applications
A web site is a collection of static files, HTML pages,
graphics, and various other files.
A web application is a web site with dynamic functionality on
the server.
A web application run programs on the server, for example:
A browser makes a request, to the server, for an HTML form.
The server responds by sending the HTML form back to the
browser in an HTTP request stream.
Next, the browser sends another request, with data from the
HTML form, to the server.
The server passes the request and data to a program that
responds by sending data back to the browser.
Execution of CGI Programs
A CGI program handling a single request:
Execution of CGI Programs (Contd.)
A CGI program handling multiple requests:
Execution of Java Servlets
A servlet program handling a single request:
Execution of Java Servlets (Contd.)
A servlet program handling multiple requests:
Advantages of running programs in separate processes
over threads:
Programs can be written in a variety of languages
Web designers can easily reference programs that run in
separate processes.
Advantages of running servlet programs in threads
compared with other languages not in threads:
The CPU requirements are lower.
Java technologies separate processing code (business logic)
from the HTML (presentation logic).
The Java language is robust and object-oriented.
The Java language is platform-independent.
Using Separate Processes or Using Threads
Java Servlets
A servlet is a Java technology component that executes on
the server.
Servlet programs perform the following:
Process HTTP requests
Generate dynamic HTTP responses
A web container is a special Java Virtual Machine (JVM™)
tool interface that manages the servlets and a thread pool.
JavaServer Pages™ Technology
JSP pages are translated into Java servlet classes that are
compiled and execute as servlets in the web container.
JSP pages should focus on the presentation logic, not on
the business logic. This makes for a good design.
In JSP pages, custom tags and JSP Expression Language
provide for reusable code and separation of concerns.
Java code can be embedded into JSP pages.
In a Java technology web application, JSP pages are often
used in conjunction with servlets and business objects in a
Model-View-Controller pattern.
Demo: JavaServer Pages™ Technology
Demo: JavaServerPages Technology
Concerns When Using Servlets and JSP™ Technology
Advantages of JSP technology:
Provides high performance and scalability because threads are
used
Is built on Java technology, so it is platform-independent.
Can take advantage of the object-oriented language and its
APIs
Concerns When Using Servlets and JSP™ Technology (Contd.)
Disadvantages of JSP technology:
If JSP pages are used in isolation, then the scripting code that
performs business and control logic can become cumbersome
in the JSP pages. JSP pages are also difficult to debug.
There is separation of concerns into business logic and
presentation logic.
There are concurrency issues.
Web Application – Three-Tier Architecture
Model-View-Controller (MVC) Architecture in a Web
Application
Model 2 Architecture
Deployment diagram of a web container using Model 2
architecture:
Frameworks are partial implementations on which you can
build your components.
There are several Model 2 frameworks available:
Struts from the Jakarta group
JavaServer Faces technology from Sun
Velocity from Apache
Model 2 Frameworks
Modular design allows for easier modification of the
business logic.
Enterprise components can use container-provided services
such as presentation, security, transaction, persistence, and
life cycle management.
Java EE Containers
Java EE Architecture Example
Job Roles
The modularity of Java EE architecture clearly distinguishes
several job roles:
Web Designer – Creates View elements
Web Component Developer – Creates Controller elements
Business Component Developer – Creates Model elements
Data Access Developer – Creates database access elements
A matrix showing the relationship between an architecture’s
complexity and robustness, based on the technologies
used:
Web Application Migration
In this session, you learned:
CGI provided hooks for web servers to execute application
programs.
Java servlets are similar to CGI, but they execute in a JVM
using threading.
JSP pages are similar to servlets, but they are better suited for
generating HTML content.
The Model 2 architecture uses servlets in conjunction with JSP
pages to build web applications.
Well designed web applications using Model 2 can be easily
migrated to more complex Java EE architectures.
Summary

Más contenido relacionado

La actualidad más candente

Pilot Study - WSO2 Enterprise Integrator v6.1.1
Pilot Study - WSO2 Enterprise Integrator v6.1.1Pilot Study - WSO2 Enterprise Integrator v6.1.1
Pilot Study - WSO2 Enterprise Integrator v6.1.1GaneshNagalingam1
 
Integrating WebSphere Service Registry and Repository V8 with Process Server
Integrating WebSphere Service Registry and Repository V8 with Process ServerIntegrating WebSphere Service Registry and Repository V8 with Process Server
Integrating WebSphere Service Registry and Repository V8 with Process ServerGaneshNagalingam1
 
Flex for enterprise applications
Flex for enterprise applicationsFlex for enterprise applications
Flex for enterprise applicationsdarshanvartak
 
Actively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net DeveloperActively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net DeveloperKarthik Reddy
 
Putting *Sparkle* in Your Social Applications! Customization and Branding wit...
Putting *Sparkle* in Your Social Applications! Customization and Branding wit...Putting *Sparkle* in Your Social Applications! Customization and Branding wit...
Putting *Sparkle* in Your Social Applications! Customization and Branding wit...Mitch Cohen
 
Websphere Portal
Websphere PortalWebsphere Portal
Websphere Portaldominion
 
IBM WebSphere Portal References Education
IBM WebSphere Portal References EducationIBM WebSphere Portal References Education
IBM WebSphere Portal References EducationDvir Reznik
 
Moving to Microsoft Visual Basic .NET
Moving to Microsoft Visual Basic .NETMoving to Microsoft Visual Basic .NET
Moving to Microsoft Visual Basic .NETV Sanchez
 
J2ee web services(overview)
J2ee web services(overview)J2ee web services(overview)
J2ee web services(overview)Prafull Jain
 
01 web sphere portal business overview
01 web sphere portal business overview01 web sphere portal business overview
01 web sphere portal business overviewygolani
 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netconline training
 
WebSphere Portal Business Overview
WebSphere Portal Business OverviewWebSphere Portal Business Overview
WebSphere Portal Business OverviewJoel Demay
 
Introduction to WebSphere Message Broker
Introduction to WebSphere Message BrokerIntroduction to WebSphere Message Broker
Introduction to WebSphere Message BrokerAnt Phillips
 
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 ADFMohamed Shahpoup
 
Online advertising management system
Online advertising management systemOnline advertising management system
Online advertising management systemYesu Raj
 

La actualidad más candente (20)

Pilot Study - WSO2 Enterprise Integrator v6.1.1
Pilot Study - WSO2 Enterprise Integrator v6.1.1Pilot Study - WSO2 Enterprise Integrator v6.1.1
Pilot Study - WSO2 Enterprise Integrator v6.1.1
 
Integrating WebSphere Service Registry and Repository V8 with Process Server
Integrating WebSphere Service Registry and Repository V8 with Process ServerIntegrating WebSphere Service Registry and Repository V8 with Process Server
Integrating WebSphere Service Registry and Repository V8 with Process Server
 
Chapter2 j2ee
Chapter2 j2eeChapter2 j2ee
Chapter2 j2ee
 
Flex for enterprise applications
Flex for enterprise applicationsFlex for enterprise applications
Flex for enterprise applications
 
Actively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net DeveloperActively looking for an opportunity to work as a challenging Dot Net Developer
Actively looking for an opportunity to work as a challenging Dot Net Developer
 
Putting *Sparkle* in Your Social Applications! Customization and Branding wit...
Putting *Sparkle* in Your Social Applications! Customization and Branding wit...Putting *Sparkle* in Your Social Applications! Customization and Branding wit...
Putting *Sparkle* in Your Social Applications! Customization and Branding wit...
 
Websphere Portal
Websphere PortalWebsphere Portal
Websphere Portal
 
IBM WebSphere Portal References Education
IBM WebSphere Portal References EducationIBM WebSphere Portal References Education
IBM WebSphere Portal References Education
 
J2 ee tutorial ejb
J2 ee tutorial ejbJ2 ee tutorial ejb
J2 ee tutorial ejb
 
Java unit 4_cs_notes
Java unit 4_cs_notesJava unit 4_cs_notes
Java unit 4_cs_notes
 
Moving to Microsoft Visual Basic .NET
Moving to Microsoft Visual Basic .NETMoving to Microsoft Visual Basic .NET
Moving to Microsoft Visual Basic .NET
 
J2ee web services(overview)
J2ee web services(overview)J2ee web services(overview)
J2ee web services(overview)
 
01 web sphere portal business overview
01 web sphere portal business overview01 web sphere portal business overview
01 web sphere portal business overview
 
Bn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot netBn1001 demo ppt advance dot net
Bn1001 demo ppt advance dot net
 
WebSphere Portal Business Overview
WebSphere Portal Business OverviewWebSphere Portal Business Overview
WebSphere Portal Business Overview
 
SeniorNET Bhanu Resume
SeniorNET Bhanu ResumeSeniorNET Bhanu Resume
SeniorNET Bhanu Resume
 
Introduction to WebSphere Message Broker
Introduction to WebSphere Message BrokerIntroduction to WebSphere Message Broker
Introduction to WebSphere Message Broker
 
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
 
Java ee introduction
Java ee introductionJava ee introduction
Java ee introduction
 
Online advertising management system
Online advertising management systemOnline advertising management system
Online advertising management system
 

Similar a Web Component Development with Servlet and JSP Technologies Unit 01

J2EE and Servlet
J2EE and Servlet J2EE and Servlet
J2EE and Servlet Rishikesh .
 
Enterprise application developement
Enterprise application developementEnterprise application developement
Enterprise application developementArchana Jha
 
Intorduction to struts
Intorduction to strutsIntorduction to struts
Intorduction to strutsAnup72
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts frameworks4al_com
 
Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC vipin kumar
 
Full stack Java Developer
Full stack Java DeveloperFull stack Java Developer
Full stack Java DeveloperMdHasan872214
 
Introduction to java ee
Introduction to java eeIntroduction to java ee
Introduction to java eeRanjan Kumar
 
Ppt for Online music store
Ppt for Online music storePpt for Online music store
Ppt for Online music storeADEEBANADEEM
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
Servlets and jsp pages best practices
Servlets and jsp pages best practicesServlets and jsp pages best practices
Servlets and jsp pages best practicesejjavies
 
Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh Dasari
 
Struts natraj - satya
Struts   natraj - satyaStruts   natraj - satya
Struts natraj - satyaSatya Johnny
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruitersph7 -
 
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 womenlissa cidhi
 

Similar a Web Component Development with Servlet and JSP Technologies Unit 01 (20)

J2EE and Servlet
J2EE and Servlet J2EE and Servlet
J2EE and Servlet
 
Enterprise application developement
Enterprise application developementEnterprise application developement
Enterprise application developement
 
Lec2 ecom fall16
Lec2 ecom fall16Lec2 ecom fall16
Lec2 ecom fall16
 
Intorduction to struts
Intorduction to strutsIntorduction to struts
Intorduction to struts
 
Introduction to ejb and struts framework
Introduction to ejb and struts frameworkIntroduction to ejb and struts framework
Introduction to ejb and struts framework
 
Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC  Cloud compiler - Minor Project by students of CBPGEC
Cloud compiler - Minor Project by students of CBPGEC
 
Full stack Java Developer
Full stack Java DeveloperFull stack Java Developer
Full stack Java Developer
 
Introduction to java ee
Introduction to java eeIntroduction to java ee
Introduction to java ee
 
Ppt for Online music store
Ppt for Online music storePpt for Online music store
Ppt for Online music store
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Month 2 report
Month 2 reportMonth 2 report
Month 2 report
 
Java EE 7 introduction
Java EE 7  introductionJava EE 7  introduction
Java EE 7 introduction
 
Servlets and jsp pages best practices
Servlets and jsp pages best practicesServlets and jsp pages best practices
Servlets and jsp pages best practices
 
Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead
 
Struts natraj - satya
Struts   natraj - satyaStruts   natraj - satya
Struts natraj - satya
 
Struts natraj - satya
Struts   natraj - satyaStruts   natraj - satya
Struts natraj - satya
 
Struts notes
Struts notesStruts notes
Struts notes
 
Java for Recruiters
Java for RecruitersJava for Recruiters
Java for Recruiters
 
AJppt.pptx
AJppt.pptxAJppt.pptx
AJppt.pptx
 
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
 

Más de Prashanth Shivakumar (11)

XML Unit 01
XML Unit 01XML Unit 01
XML Unit 01
 
WPF (Windows Presentation Foundation Unit 01)
WPF (Windows Presentation Foundation Unit 01)WPF (Windows Presentation Foundation Unit 01)
WPF (Windows Presentation Foundation Unit 01)
 
WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)WCF (Windows Communication Foundation_Unit_01)
WCF (Windows Communication Foundation_Unit_01)
 
VB.Net GUI Unit_01
VB.Net GUI Unit_01VB.Net GUI Unit_01
VB.Net GUI Unit_01
 
UML Unit 01
UML Unit 01UML Unit 01
UML Unit 01
 
RDBMS_Unit 01
RDBMS_Unit 01RDBMS_Unit 01
RDBMS_Unit 01
 
J2ME Unit_01
J2ME Unit_01J2ME Unit_01
J2ME Unit_01
 
Data Structures and Algorithms Unit 01
Data Structures and Algorithms Unit 01Data Structures and Algorithms Unit 01
Data Structures and Algorithms Unit 01
 
C++ Unit_01
C++ Unit_01C++ Unit_01
C++ Unit_01
 
Advanced excel unit 01
Advanced excel unit 01Advanced excel unit 01
Advanced excel unit 01
 
C programming unit 01
C programming unit 01C programming unit 01
C programming unit 01
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 

Último (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Web Component Development with Servlet and JSP Technologies Unit 01

  • 1. In this session, you will learn to: Describe web applications Describe Java Platform, Enterprise Edition 6 (Java EE 6) Describe web application program execution methods and the advantages and disadvantages of each Describe Java servlet technology Describe JavaServer Pages technology Define three-tier architecture Define Model-View-Controller (MVC) architecture Objectives
  • 2. HTML over HTTP Common Gateway Interface (CGI) Servlets JavaServer Pages (JSP) technology JSP Standard Tag Library (JSTL) XML Struts JavaServer Faces Web Application Technologies
  • 3. Java™ EE 6 Java EE is the industry standard for developing portable, robust, scalable and secure server-side Java applications. Java EE is built on the solid foundation of Java Platform, Standard Edition (Java SE). Java EE is a set of coordinated technologies which includes the following web application technologies: Java Servlet 2.6 (Java Specification Requests [JSR] 164) JavaServer Pages 2.1 (JSR 246) JavaServer Pages Standard Tag Library (JSR 62) JavaServer Faces 1.2 (JSR 262)
  • 4. Java™ EE 6 (Contd.) For a complete list of Java technologies, go to: http://java.sun.com/javaee/technologies/ http://java.sun.com/javase/technologies/
  • 5. Java EE 6 SDK
  • 6. Web Sites and Web Applications A web site is a collection of static files, HTML pages, graphics, and various other files. A web application is a web site with dynamic functionality on the server. A web application run programs on the server, for example: A browser makes a request, to the server, for an HTML form. The server responds by sending the HTML form back to the browser in an HTTP request stream. Next, the browser sends another request, with data from the HTML form, to the server. The server passes the request and data to a program that responds by sending data back to the browser.
  • 7. Execution of CGI Programs A CGI program handling a single request:
  • 8. Execution of CGI Programs (Contd.) A CGI program handling multiple requests:
  • 9. Execution of Java Servlets A servlet program handling a single request:
  • 10. Execution of Java Servlets (Contd.) A servlet program handling multiple requests:
  • 11. Advantages of running programs in separate processes over threads: Programs can be written in a variety of languages Web designers can easily reference programs that run in separate processes. Advantages of running servlet programs in threads compared with other languages not in threads: The CPU requirements are lower. Java technologies separate processing code (business logic) from the HTML (presentation logic). The Java language is robust and object-oriented. The Java language is platform-independent. Using Separate Processes or Using Threads
  • 12. Java Servlets A servlet is a Java technology component that executes on the server. Servlet programs perform the following: Process HTTP requests Generate dynamic HTTP responses A web container is a special Java Virtual Machine (JVM™) tool interface that manages the servlets and a thread pool.
  • 13. JavaServer Pages™ Technology JSP pages are translated into Java servlet classes that are compiled and execute as servlets in the web container. JSP pages should focus on the presentation logic, not on the business logic. This makes for a good design. In JSP pages, custom tags and JSP Expression Language provide for reusable code and separation of concerns. Java code can be embedded into JSP pages. In a Java technology web application, JSP pages are often used in conjunction with servlets and business objects in a Model-View-Controller pattern.
  • 14. Demo: JavaServer Pages™ Technology Demo: JavaServerPages Technology
  • 15. Concerns When Using Servlets and JSP™ Technology Advantages of JSP technology: Provides high performance and scalability because threads are used Is built on Java technology, so it is platform-independent. Can take advantage of the object-oriented language and its APIs
  • 16. Concerns When Using Servlets and JSP™ Technology (Contd.) Disadvantages of JSP technology: If JSP pages are used in isolation, then the scripting code that performs business and control logic can become cumbersome in the JSP pages. JSP pages are also difficult to debug. There is separation of concerns into business logic and presentation logic. There are concurrency issues.
  • 17. Web Application – Three-Tier Architecture
  • 19. Model 2 Architecture Deployment diagram of a web container using Model 2 architecture:
  • 20. Frameworks are partial implementations on which you can build your components. There are several Model 2 frameworks available: Struts from the Jakarta group JavaServer Faces technology from Sun Velocity from Apache Model 2 Frameworks
  • 21. Modular design allows for easier modification of the business logic. Enterprise components can use container-provided services such as presentation, security, transaction, persistence, and life cycle management. Java EE Containers
  • 23. Job Roles The modularity of Java EE architecture clearly distinguishes several job roles: Web Designer – Creates View elements Web Component Developer – Creates Controller elements Business Component Developer – Creates Model elements Data Access Developer – Creates database access elements
  • 24. A matrix showing the relationship between an architecture’s complexity and robustness, based on the technologies used: Web Application Migration
  • 25. In this session, you learned: CGI provided hooks for web servers to execute application programs. Java servlets are similar to CGI, but they execute in a JVM using threading. JSP pages are similar to servlets, but they are better suited for generating HTML content. The Model 2 architecture uses servlets in conjunction with JSP pages to build web applications. Well designed web applications using Model 2 can be easily migrated to more complex Java EE architectures. Summary

Notas del editor

  1. Start the session by explaining the objectives listed in Slide 1.
  2. In this slide, tell the students about the Web application technologies. Start by describing the HTTP. Tell that the HTTP is a request/response protocol between clients and servers. Tell the students that the Servlets, JSP, and Struts will be covered in the later part of this module.
  3. In this slide, explain to the students about the Java Platform, Enterprise Edition 6 as given in SG.
  4. Open the hyperlink given in this slide to show to the students the complete list of Java technologies.
  5. Use this slide to explain to the students about the Java EE 6 SDK.
  6. Use this slide to explain to the students about the Web sites and Web applications.
  7. Use Slides 7 and 8 to explain the execution of the CGI programs. Explain about the CGI programs and their advantages and disadvantages, as given in pages 1-9 to 1-12 of the SG.
  8. Use Slides 9 and 10 to explain the execution of the Java Servlets.
  9. Use this slide to explain about the advantages and disadvantages of using Servlets over the CGI programs.
  10. In this slide, explain to the students about the Java Servlets. Tell the students that the Servlets allow you to add dynamic content to a Web server using the Java platform.
  11. Use this slide to explain about the JavaServerPages technology.
  12. Use this slide to demonstrate the comparison of JSP and servlet coding to the students. You can run the project, SquaresServlet stored at Datafiles For Faculty\Session01\Demo1\SquaresServlet.zip file in the TIRM CD. This project contains a JSP file, index.jsp, which displays the squares of numbers 0 through 9 in an HTML table. You can show the students the equivalent servlet, SquaresServlet.java, which can be found at Datafiles For Faculty\Session01\Demo1 in the TIRM CD.
  13. Use Slides 14 and 16 to explain to the students about the advantages and disadvantages of JSP technology. Also, tell the students about when to use Servlets and JSP technology in the Web application.
  14. Use this slide to explain to the students about the three-tier architecture for Web applications.
  15. Use this slide to explain about the Model-View-Controller (MVC) architecture in Web application.
  16. Use this slide to explain about the Model 2 architecture. In the Model 2 architecture, Servlets control the flow of the web application and delegate the business logic to external components, such as JavaBeans or EJBs, while JSP pages generate the HTML for web browsers.
  17. Use this slide to explain about the Model 2 frameworks.
  18. Use this slide to explain about the Java EE containers. Explain that the containers are the interface between a component and the low-level platform-specific functionality that supports the component. Before the execution of a web application, it must be assembled into a Java EE module and deployed into its container.
  19. In this slide, explain to the students about the Java EE architecture. Also, discuss about its features such as scalability, extensibility, and maintainability.
  20. Use this slide to discuss about the Job roles.
  21. Use this slide to explain a matrix of the relationship between an architecture’s complexity and robustness, based on technologies used.
  22. End the session by discussing the summary points as given in Slide 26.