JavaServer: - PowerPoint PPT Presentation

1 / 19
About This Presentation
Title:

JavaServer:

Description:

Two-tiered, Three-tiered, N-tiered Models. Basics of Communication: Socket. Some Socket Examples ... JavaScript. Data Handling. Extensible Markup Language (XML) ... – PowerPoint PPT presentation

Number of Views:34
Avg rating:3.0/5.0
Slides: 20
Provided by: themeshe
Category:

less

Transcript and Presenter's Notes

Title: JavaServer:


1
JavaServer Web Solutions Through Java
Presenter Nick Meshes NickISPro_at_aol.com www.meshe
s.com
2
  • Open DOS Prompt
  • Type javac and read output
  • Change directory to bin
  • Type startup

3
  • Quick History of Web Technologies
  • Architecture of the Web
  • Browser and Server Technology
  • Two-tiered, Three-tiered, N-tiered Models
  • Basics of Communication Socket
  • Some Socket Examples
  • What is a Servlet?
  • The Servlet Engine
  • Lifecycle of a Servlet

4
  • HelloWorld Servlet
  • SendMail Servlet
  • What are JavaServer Pages (JSP)?
  • Elements of a JSP
  • Some JSP Examples

5
  • Quick History of Web Technologies
  • HyperText Markup Language (HTML)
  • Flat text files representing text and images
    laid out on a screen
  • (Common Gateway Interface) CGI
  • Server-side processing
  • Not scalable or flexible
  • Microsofts Active Server Pages
  • Provided clean conection to data sources
  • Managed page, session, application

6
  • Quick History of Web Technologies
  • Microsofts Active Server Pages
  • Separated presentation from model
  • Limited tasks could be performed in script
  • Java Server Solutions
  • Portable (NT, Unix, Mac, etc.)
  • Flexible (receiving text, objects, bridging)
  • Lightweight (load as needed, threading)
  • Handle JNDI, JDBC, RMI, EJB, etc.

7
Web Server
Request
Server Side Services
Response
Data Sources
Universal Resource Locator (URL) Address web
browser uses to find web services
8
  • Server Side
  • File Server
  • CGI
  • Active Server Pages
  • Java Servlets
  • JavaServer Pages

9
  • Client Side
  • HyperText Markup Language (HTML)
  • Scripting
  • Dynamic HTML
  • JavaScript
  • Data Handling
  • Extensible Markup Language (XML)
  • Applications
  • ActiveX Controls
  • Applets
  • Plug-ins

10
  • Web Servers
  • Apache (most common, free,
  • http//www.apache.org
  • Internet Information Server / PWS
  • Netscape Enterprise
  • Many others...

11
  • Web browsers
  • Internet Explorer
  • Netscape Navigator
  • Many others...

12
  • Two-Tiered
  • Server merely acts as file retrieval
  • Too much load on PC
  • Small changes means big rollouts
  • Three-Tiered
  • Client only receives data and formats it
  • Server handles most processing
  • Implementation details are hidden
  • Main issue Stovepipes
  • New service means new server

13
  • N-Tiered
  • Presentation details same as 3-Tier
  • All servers talk to each other
  • Common interfaces between servers
  • Implementation details are hidden between servers

14
  • Basis of all communication between computers
  • How it works
  • Opens a port on local system
  • Connect with remote listening port
  • Listener passes connection to new socket
  • Transmit and receive data between sockets
  • Close socket connection upon completion

15
  • URL Connection (Client Socket)
  • Echo Server (Server Socket)
  • Client Connection (Standard Socket)

16
  • Small specialized server implemented in Java
  • What it does
  • Receives HTTP requests
  • Does some processing
  • Data sources or other servers
  • Returns an HTTP Response
  • Runs under a JVM
  • Handled within a Servlet Container (Engine)
  • Each servlet is handled in its own thread
  • Web server can talk to servlet
  • Stand-alone / In-process / Out-of-process

17
  • Handles network connection
  • Receives request, returns response
  • HTTPRequest, HTTPResponse objects to Servlet

18
  • Instantiate the servlet
  • Servlet.init()
  • Servlet.service()
  • Thread is recycled
  • On Engine close, Servlet.destroy()
  • Garbage Collection

19
  • getServletConfig() to get Context
  • doGet(Request, Response)
  • doPost(Request, Response)
  • Lets do some examples!
Write a Comment
User Comments (0)
About PowerShow.com