SlideShare a Scribd company logo
Session 1  
Web Applications – An Overview
JSP and Servlets / Session 1 / 2 of 15
Objectives
Describe a multi-level architectural view of a
Web application.
Review HTTP protocol
Describe the anatomy of a typical Web
Application.
Describe the Web development process
Setup Tomcat environment in Java Studio
Enterprise 8.
JSP and Servlets / Session 1 / 3 of 15
Desktop Applications 2-1
User Windows Media Player
User selects an mp3 file
Media Player playing the mp3 file
JSP and Servlets / Session 1 / 4 of 15
Desktop Applications 2-2
User Windows Media Player
Request = Select a file to play
User sends a request
Player sends a response
Response = Media Player plays the selected file
Media Player is an example of desktop application
JSP and Servlets / Session 1 / 5 of 15
Web Applications 2-1
Web Site hosted on a
Web Server
www.mp3.com
JSP and Servlets / Session 1 / 6 of 15
Web Applications 2-2
www.mp3.com Web Application
Web Application running on a Web Server
User requests a song
Song is played in response
Advantages of Web Applications:
•Accessing Web Applications is easier
•Maintenance and deployment costs are low
JSP and Servlets / Session 1 / 7 of 15
HTTP Protocol 3-1
Get File HTTP
GET
image/bar01.jpg
HTTP/1.1
HTTP/1.1 200 OKFile Received
HyperText Transfer Protocol
Stateless protocol
Used to send request and response messages over the
Internet.
Uses port 80 to send and receive messages
JSP and Servlets / Session 1 / 8 of 15
HTTP messages consist of:
Request
Response
Headers
HTTP Protocol 3-2
Request Message
Request Line
Header Information
Method Resource Name Version
GET/POST bar01.jpg HTTP/1.1
Browser Type Content Type
User-Agent: Mozilla/4.0 (Compatible; MSIE 4.0 : Windows 95
Accept: image/gif, image/jpeg, text/*, */*
Response Message
Status Line
Header Information
Version Status Code Description
HTTP/1.1 200 OK
Server
Software
Modified
Date
Size
(bytes)
Content
Type
Server: JavaWebServer
Last modified: Tuesday, 07-Sep-04 1:14:34 GMT
Content-length: 100
Content-type: text/plain
JSP and Servlets / Session 1 / 9 of 15
HTTP Protocol 3-3
HTTP protocol uses the following methods to send
request messages:
 GET Method
 POST Method
 GET Method
 Used for retrieving information such as
document, charts, or database query
results.
 Requested pages can be bookmarked and
emailed.
 Request information is sent as query string
 POST Method
 Used to send sensitive information such as
credit card numbers or information to be
saved in the database.
 Requested pages cannot be bookmarked
or emailed.
 No size limit on information being sent
query string
(240-255 characters)
JSP and Servlets / Session 1 / 10 of 15
Application Architecture
Software Application Components
-Presentation Logic
-Application Logic
-Data Access Logic
Types of Architecture
-One-Tier
-Two-Tier
-Three-Tier
Data Access
Business
Presentation
Data Access
Business
Presentation
JSP and Servlets / Session 1 / 11 of 15
Web Application Architecture
Web Applications use Three-tier architecture
Presentation Tier
Clients
Business Tier
Web Server
Database
Data Tier
JSP and Servlets / Session 1 / 12 of 15
Web Application Directory Structure
Web Application
 HTML files
 Images
 Servlets
 JSP pages
 JavaBeans
 Jar files
 Applets
 Tag files
 Tag Library
Descriptor files
 Deployment
descriptors
.war file
Document Root
Static Files(html, images, JSP) WEB-INF
lib tags .tld, web.xmlclasses
Web Application Directory Structure
index.html, login.jsp, contactus.jsp
ViewBooks.jsp, logo.jpg
book1.jpg
AddBook.class,
DeleteBook.class
mbase.jar,
msqlserver.
jar,
msutil.jar
DisplayBook.tag web.xml, books.tld
JSP and Servlets / Session 1 / 13 of 15
Web Application Development Process
Design a directory structure
Write web application code
Write deployment descriptor
Compile the code
Package web application
Deploy web application
Execute web application
JSP and Servlets / Session 1 / 14 of 15
Tomcat Configuration
Demonstration
Steps to configure Tomcat in Java Studio
Enterprise 8
Select ToolsServer Manager
JSP and Servlets / Session 1 / 15 of 15
Summary
 Web applications are easy to maintain, upgrade and
deploy as compared to desktop applications.
 Pages requested using GET method can be bookmarked
and emailed.
 POST method is used when sending sensitive
information such as credit card numbers, passwords and
so on.
 In three-tier architecture, the presentation tier cannot
interact with the data tier.
 JBuilder Enterprise 2005 can be configured to use
external Tomcat installation.

More Related Content

Similar to Session 1 tp1

Web servers
Web serversWeb servers
Web servers
webhostingguy
 
Dh2 Apps Training Part2
Dh2   Apps Training Part2Dh2   Apps Training Part2
Dh2 Apps Training Part2
jamram82
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp Net
Adil Mughal
 
Servlet by Rj
Servlet by RjServlet by Rj
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
Pratik Tambekar
 
Web Programming introduction
Web Programming introductionWeb Programming introduction
Web Programming introduction
Abdul-Rahman Mahmood
 
Servletv1 nt
Servletv1 ntServletv1 nt
Servletv1 nt
Anand Priyadarshi
 
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.pptweb-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
20521742
 
Silverlight 2.0
Silverlight 2.0Silverlight 2.0
Silverlight 2.0
Dave Allen
 
Servlet classnotes
Servlet classnotesServlet classnotes
Servlet classnotes
Vasanti Dutta
 
Asp dot net final (2)
Asp dot net   final (2)Asp dot net   final (2)
Asp dot net final (2)
Amelina Ahmeti
 
Application layer protocol
Application layer protocolApplication layer protocol
Application layer protocol
Dr. Amitava Nag
 
Web Server-Side Programming Techniques
Web Server-Side Programming TechniquesWeb Server-Side Programming Techniques
Web Server-Side Programming Techniques
guest8899ec02
 
Spider Course Day 1
Spider Course Day 1Spider Course Day 1
Spider Course Day 1
Harishankaran K
 
Jsp Comparison
 Jsp Comparison Jsp Comparison
Jsp Comparison
Venky Sadasivam
 
Introduction to SIP(Session Initiation Protocol)
Introduction to SIP(Session Initiation Protocol)Introduction to SIP(Session Initiation Protocol)
Introduction to SIP(Session Initiation Protocol)
William Lee
 
Constraints Make You Sexy - What is Rest
Constraints Make You Sexy  - What is RestConstraints Make You Sexy  - What is Rest
Constraints Make You Sexy - What is Rest
anorqiu
 
ASP.NET WEB API Training
ASP.NET WEB API TrainingASP.NET WEB API Training
ASP.NET WEB API Training
Chalermpon Areepong
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
Chamnap Chhorn
 
Websphere - overview and introduction
Websphere - overview and introduction Websphere - overview and introduction
Websphere - overview and introduction
Vibrant Technologies & Computers
 

Similar to Session 1 tp1 (20)

Web servers
Web serversWeb servers
Web servers
 
Dh2 Apps Training Part2
Dh2   Apps Training Part2Dh2   Apps Training Part2
Dh2 Apps Training Part2
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp Net
 
Servlet by Rj
Servlet by RjServlet by Rj
Servlet by Rj
 
Distributed System by Pratik Tambekar
Distributed System by Pratik TambekarDistributed System by Pratik Tambekar
Distributed System by Pratik Tambekar
 
Web Programming introduction
Web Programming introductionWeb Programming introduction
Web Programming introduction
 
Servletv1 nt
Servletv1 ntServletv1 nt
Servletv1 nt
 
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.pptweb-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
 
Silverlight 2.0
Silverlight 2.0Silverlight 2.0
Silverlight 2.0
 
Servlet classnotes
Servlet classnotesServlet classnotes
Servlet classnotes
 
Asp dot net final (2)
Asp dot net   final (2)Asp dot net   final (2)
Asp dot net final (2)
 
Application layer protocol
Application layer protocolApplication layer protocol
Application layer protocol
 
Web Server-Side Programming Techniques
Web Server-Side Programming TechniquesWeb Server-Side Programming Techniques
Web Server-Side Programming Techniques
 
Spider Course Day 1
Spider Course Day 1Spider Course Day 1
Spider Course Day 1
 
Jsp Comparison
 Jsp Comparison Jsp Comparison
Jsp Comparison
 
Introduction to SIP(Session Initiation Protocol)
Introduction to SIP(Session Initiation Protocol)Introduction to SIP(Session Initiation Protocol)
Introduction to SIP(Session Initiation Protocol)
 
Constraints Make You Sexy - What is Rest
Constraints Make You Sexy  - What is RestConstraints Make You Sexy  - What is Rest
Constraints Make You Sexy - What is Rest
 
ASP.NET WEB API Training
ASP.NET WEB API TrainingASP.NET WEB API Training
ASP.NET WEB API Training
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
 
Websphere - overview and introduction
Websphere - overview and introduction Websphere - overview and introduction
Websphere - overview and introduction
 

More from Jafar Nesargi

Network adpater,cabel,cards ,types, network devices
Network adpater,cabel,cards ,types, network devicesNetwork adpater,cabel,cards ,types, network devices
Network adpater,cabel,cards ,types, network devices
Jafar Nesargi
 
An introduction to networking
An introduction to networkingAn introduction to networking
An introduction to networking
Jafar Nesargi
 
Computer basics Intro
Computer basics IntroComputer basics Intro
Computer basics Intro
Jafar Nesargi
 
Css
CssCss
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
Jafar Nesargi
 
Chapter 6 relational data model and relational
Chapter  6  relational data model and relationalChapter  6  relational data model and relational
Chapter 6 relational data model and relational
Jafar Nesargi
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationChapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organization
Jafar Nesargi
 
Chapter3
Chapter3Chapter3
Chapter3
Jafar Nesargi
 
Introduction to-oracle
Introduction to-oracleIntroduction to-oracle
Introduction to-oracleJafar Nesargi
 
Chapter2
Chapter2Chapter2
Chapter2
Jafar Nesargi
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
Jafar Nesargi
 
Session1 gateway to web page development
Session1   gateway to web page developmentSession1   gateway to web page development
Session1 gateway to web page development
Jafar Nesargi
 
Introduction to jsp
Introduction to jspIntroduction to jsp
Introduction to jsp
Jafar Nesargi
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
Jafar Nesargi
 
Rmi
RmiRmi
Java bean
Java beanJava bean
Java bean
Jafar Nesargi
 
Networking
NetworkingNetworking
Networking
Jafar Nesargi
 
Chapter2 j2ee
Chapter2 j2eeChapter2 j2ee
Chapter2 j2ee
Jafar Nesargi
 
Chapter 1 swings
Chapter 1 swingsChapter 1 swings
Chapter 1 swings
Jafar Nesargi
 
Record storage and primary file organization
Record storage and primary file organizationRecord storage and primary file organization
Record storage and primary file organization
Jafar Nesargi
 

More from Jafar Nesargi (20)

Network adpater,cabel,cards ,types, network devices
Network adpater,cabel,cards ,types, network devicesNetwork adpater,cabel,cards ,types, network devices
Network adpater,cabel,cards ,types, network devices
 
An introduction to networking
An introduction to networkingAn introduction to networking
An introduction to networking
 
Computer basics Intro
Computer basics IntroComputer basics Intro
Computer basics Intro
 
Css
CssCss
Css
 
Chapter 7 relation database language
Chapter 7 relation database languageChapter 7 relation database language
Chapter 7 relation database language
 
Chapter 6 relational data model and relational
Chapter  6  relational data model and relationalChapter  6  relational data model and relational
Chapter 6 relational data model and relational
 
Chapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organizationChapter 4 record storage and primary file organization
Chapter 4 record storage and primary file organization
 
Chapter3
Chapter3Chapter3
Chapter3
 
Introduction to-oracle
Introduction to-oracleIntroduction to-oracle
Introduction to-oracle
 
Chapter2
Chapter2Chapter2
Chapter2
 
Cascading style sheets
Cascading style sheetsCascading style sheets
Cascading style sheets
 
Session1 gateway to web page development
Session1   gateway to web page developmentSession1   gateway to web page development
Session1 gateway to web page development
 
Introduction to jsp
Introduction to jspIntroduction to jsp
Introduction to jsp
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
 
Rmi
RmiRmi
Rmi
 
Java bean
Java beanJava bean
Java bean
 
Networking
NetworkingNetworking
Networking
 
Chapter2 j2ee
Chapter2 j2eeChapter2 j2ee
Chapter2 j2ee
 
Chapter 1 swings
Chapter 1 swingsChapter 1 swings
Chapter 1 swings
 
Record storage and primary file organization
Record storage and primary file organizationRecord storage and primary file organization
Record storage and primary file organization
 

Recently uploaded

Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
Scholarhat
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
taiba qazi
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
Nguyen Thanh Tu Collection
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
Dr. Mulla Adam Ali
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
TechSoup
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
paigestewart1632
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
Nicholas Montgomery
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
Colégio Santa Teresinha
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
TechSoup
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
Celine George
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
amberjdewit93
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
mulvey2
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
adhitya5119
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
NgcHiNguyn25
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
Nicholas Montgomery
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
Jean Carlos Nunes Paixão
 

Recently uploaded (20)

Azure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHatAzure Interview Questions and Answers PDF By ScholarHat
Azure Interview Questions and Answers PDF By ScholarHat
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
DRUGS AND ITS classification slide share
DRUGS AND ITS classification slide shareDRUGS AND ITS classification slide share
DRUGS AND ITS classification slide share
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2023-2024 (CÓ FI...
 
Hindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdfHindi varnamala | hindi alphabet PPT.pdf
Hindi varnamala | hindi alphabet PPT.pdf
 
Walmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdfWalmart Business+ and Spark Good for Nonprofits.pdf
Walmart Business+ and Spark Good for Nonprofits.pdf
 
Cognitive Development Adolescence Psychology
Cognitive Development Adolescence PsychologyCognitive Development Adolescence Psychology
Cognitive Development Adolescence Psychology
 
Film vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movieFilm vocab for eal 3 students: Australia the movie
Film vocab for eal 3 students: Australia the movie
 
MARY JANE WILSON, A “BOA MÃE” .
MARY JANE WILSON, A “BOA MÃE”           .MARY JANE WILSON, A “BOA MÃE”           .
MARY JANE WILSON, A “BOA MÃE” .
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat  Leveraging AI for Diversity, Equity, and InclusionExecutive Directors Chat  Leveraging AI for Diversity, Equity, and Inclusion
Executive Directors Chat Leveraging AI for Diversity, Equity, and Inclusion
 
How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17How to Make a Field Mandatory in Odoo 17
How to Make a Field Mandatory in Odoo 17
 
Digital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental DesignDigital Artefact 1 - Tiny Home Environmental Design
Digital Artefact 1 - Tiny Home Environmental Design
 
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptxC1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
C1 Rubenstein AP HuG xxxxxxxxxxxxxx.pptx
 
Advanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docxAdvanced Java[Extra Concepts, Not Difficult].docx
Advanced Java[Extra Concepts, Not Difficult].docx
 
Life upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for studentLife upper-Intermediate B2 Workbook for student
Life upper-Intermediate B2 Workbook for student
 
writing about opinions about Australia the movie
writing about opinions about Australia the moviewriting about opinions about Australia the movie
writing about opinions about Australia the movie
 
A Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdfA Independência da América Espanhola LAPBOOK.pdf
A Independência da América Espanhola LAPBOOK.pdf
 

Session 1 tp1

  • 1. Session 1   Web Applications – An Overview
  • 2. JSP and Servlets / Session 1 / 2 of 15 Objectives Describe a multi-level architectural view of a Web application. Review HTTP protocol Describe the anatomy of a typical Web Application. Describe the Web development process Setup Tomcat environment in Java Studio Enterprise 8.
  • 3. JSP and Servlets / Session 1 / 3 of 15 Desktop Applications 2-1 User Windows Media Player User selects an mp3 file Media Player playing the mp3 file
  • 4. JSP and Servlets / Session 1 / 4 of 15 Desktop Applications 2-2 User Windows Media Player Request = Select a file to play User sends a request Player sends a response Response = Media Player plays the selected file Media Player is an example of desktop application
  • 5. JSP and Servlets / Session 1 / 5 of 15 Web Applications 2-1 Web Site hosted on a Web Server www.mp3.com
  • 6. JSP and Servlets / Session 1 / 6 of 15 Web Applications 2-2 www.mp3.com Web Application Web Application running on a Web Server User requests a song Song is played in response Advantages of Web Applications: •Accessing Web Applications is easier •Maintenance and deployment costs are low
  • 7. JSP and Servlets / Session 1 / 7 of 15 HTTP Protocol 3-1 Get File HTTP GET image/bar01.jpg HTTP/1.1 HTTP/1.1 200 OKFile Received HyperText Transfer Protocol Stateless protocol Used to send request and response messages over the Internet. Uses port 80 to send and receive messages
  • 8. JSP and Servlets / Session 1 / 8 of 15 HTTP messages consist of: Request Response Headers HTTP Protocol 3-2 Request Message Request Line Header Information Method Resource Name Version GET/POST bar01.jpg HTTP/1.1 Browser Type Content Type User-Agent: Mozilla/4.0 (Compatible; MSIE 4.0 : Windows 95 Accept: image/gif, image/jpeg, text/*, */* Response Message Status Line Header Information Version Status Code Description HTTP/1.1 200 OK Server Software Modified Date Size (bytes) Content Type Server: JavaWebServer Last modified: Tuesday, 07-Sep-04 1:14:34 GMT Content-length: 100 Content-type: text/plain
  • 9. JSP and Servlets / Session 1 / 9 of 15 HTTP Protocol 3-3 HTTP protocol uses the following methods to send request messages:  GET Method  POST Method  GET Method  Used for retrieving information such as document, charts, or database query results.  Requested pages can be bookmarked and emailed.  Request information is sent as query string  POST Method  Used to send sensitive information such as credit card numbers or information to be saved in the database.  Requested pages cannot be bookmarked or emailed.  No size limit on information being sent query string (240-255 characters)
  • 10. JSP and Servlets / Session 1 / 10 of 15 Application Architecture Software Application Components -Presentation Logic -Application Logic -Data Access Logic Types of Architecture -One-Tier -Two-Tier -Three-Tier Data Access Business Presentation Data Access Business Presentation
  • 11. JSP and Servlets / Session 1 / 11 of 15 Web Application Architecture Web Applications use Three-tier architecture Presentation Tier Clients Business Tier Web Server Database Data Tier
  • 12. JSP and Servlets / Session 1 / 12 of 15 Web Application Directory Structure Web Application  HTML files  Images  Servlets  JSP pages  JavaBeans  Jar files  Applets  Tag files  Tag Library Descriptor files  Deployment descriptors .war file Document Root Static Files(html, images, JSP) WEB-INF lib tags .tld, web.xmlclasses Web Application Directory Structure index.html, login.jsp, contactus.jsp ViewBooks.jsp, logo.jpg book1.jpg AddBook.class, DeleteBook.class mbase.jar, msqlserver. jar, msutil.jar DisplayBook.tag web.xml, books.tld
  • 13. JSP and Servlets / Session 1 / 13 of 15 Web Application Development Process Design a directory structure Write web application code Write deployment descriptor Compile the code Package web application Deploy web application Execute web application
  • 14. JSP and Servlets / Session 1 / 14 of 15 Tomcat Configuration Demonstration Steps to configure Tomcat in Java Studio Enterprise 8 Select ToolsServer Manager
  • 15. JSP and Servlets / Session 1 / 15 of 15 Summary  Web applications are easy to maintain, upgrade and deploy as compared to desktop applications.  Pages requested using GET method can be bookmarked and emailed.  POST method is used when sending sensitive information such as credit card numbers, passwords and so on.  In three-tier architecture, the presentation tier cannot interact with the data tier.  JBuilder Enterprise 2005 can be configured to use external Tomcat installation.