SlideShare a Scribd company logo
1 of 15
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

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
 
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.pptweb-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
web-servers3952 (1)qwjelkjqwlkjkqlwe.ppt
20521742
 
Introduction to Web Architecture
Introduction to Web ArchitectureIntroduction to Web Architecture
Introduction to Web Architecture
Chamnap Chhorn
 

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

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
 
Introduction to-oracle
Introduction to-oracleIntroduction to-oracle
Introduction to-oracle
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
 
Chapter 3 servlet & jsp
Chapter 3 servlet & jspChapter 3 servlet & jsp
Chapter 3 servlet & jsp
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

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
Sensory_Experience_and_Emotional_Resonance_in_Gabriel_Okaras_The_Piano_and_Th...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)Jamworks pilot and AI at Jisc (20/03/2024)
Jamworks pilot and AI at Jisc (20/03/2024)
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 

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.