Session 9. Deployment Descriptor Http. Reading and Reference. en.wikipedia.org/wiki/http. en.wikipedia.org/wiki/list_of_http_headers

Similar documents
Session 8. Reading and Reference. en.wikipedia.org/wiki/list_of_http_headers. en.wikipedia.org/wiki/http_status_codes

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

The HTTP protocol. Fulvio Corno, Dario Bonino. 08/10/09 http 1

Lecture 7b: HTTP. Feb. 24, Internet and Intranet Protocols and Applications

web.xml Deployment Descriptor Elements

Session 8. Introduction to Servlets. Semester Project

COMPUTER NETWORKS AND COMMUNICATION PROTOCOLS. Web Access: HTTP Mehmet KORKMAZ

Hypertext Transport Protocol

HTTP Reading: Section and COS 461: Computer Networks Spring 2013

Unraveling the Mysteries of J2EE Web Application Communications

Session 9. Introduction to Servlets. Lecture Objectives

REST. Lecture BigData Analytics. Julian M. Kunkel. University of Hamburg / German Climate Computing Center (DKRZ)

Lecture 3. HTTP v1.0 application layer protocol. into details. HTTP 1.0: RFC 1945, T. Berners-Lee HTTP 1.1: RFC 2068, 2616

Computer Networks. Wenzhong Li. Nanjing University

Tutorial: Developing a Simple Hello World Portlet

COSC 2206 Internet Tools. The HTTP Protocol

Caching. Caching Overview

Browser behavior can be quite complex, using more HTTP features than the basic exchange, this trace will show us how much gets transferred.

Module 3 Web Component

How to work with HTTP requests and responses

UNIT I. A protocol is a precise set of rules defining how components communicate, the format of addresses, how data is split into packets

Application Layer: The Web and HTTP Sec 2.2 Prof Lina Battestilli Fall 2017

ReST 2000 Roy Fielding W3C

Generating the Server Response: HTTP Response Headers

Topics Augmenting Application.cfm with Filters. What a filter can do. What s a filter? What s it got to do with. Isn t it a java thing?

Web, HTTP and Web Caching

WEB TECHNOLOGIES CHAPTER 1

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer

Chapter 2 Application Layer

Hypertext Transport Protocol HTTP/1.1

Writing Servlets and JSPs p. 1 Writing a Servlet p. 1 Writing a JSP p. 7 Compiling a Servlet p. 10 Packaging Servlets and JSPs p.

Structure of a webapplication

CMPE 151: Network Administration. Servers

CS 43: Computer Networks. HTTP September 10, 2018

3. WWW and HTTP. Fig.3.1 Architecture of WWW

Backends and Databases. Dr. Sarah Abraham

INF5750. RESTful Web Services

Web-APIs. Examples Consumer Technology Cross-Domain communication Provider Technology

Introduc)on to Computer Networks

HTTP Review. Carey Williamson Department of Computer Science University of Calgary

Application Protocols and HTTP

ICS 351: Today's plan. IPv6 routing protocols (summary) HTML HTTP web scripting languages certificates (review) cookies

SECTION II: JAVA SERVLETS

Configuring Traffic Policies

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

SC/CSE 3213 Winter Sebastian Magierowski York University CSE 3213, W13 L8: TCP/IP. Outline. Forwarding over network and data link layers

Servlet Fudamentals. Celsina Bignoli

UIMA Simple Server User Guide

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

CSCI-1680 WWW Rodrigo Fonseca

JBoss SOAP Web Services User Guide. Version: M5

CSP 1.3: An HTTP-Based Protocol for Parameterized, Aggregated Content

CNIT 129S: Securing Web Applications. Ch 3: Web Application Technologies

J2EE Development. Course Detail: Audience. Duration. Course Abstract. Course Objectives. Course Topics. Class Format.

Application Layer Introduction; HTTP; FTP

CSP 1.4: An HTTP-Based Protocol for Parameterized, Aggregated Content

Backends and Databases. Dr. Sarah Abraham

CH -7 RESPONSE HEADERS

Web Application Architecture (based J2EE 1.4 Tutorial)

DATA COMMUNICATOIN NETWORKING

Application Layer: HTTP

Middleware and Web Services Lecture 3: Application Server

FINALTERM EXAMINATION Spring 2009 CS506- Web Design and Development Solved by Tahseen Anwar

EE 122: HyperText Transfer Protocol (HTTP)

Appendix A GLOSSARY SYS-ED/ COMPUTER EDUCATION TECHNIQUES, INC.

Applications & Application-Layer Protocols: The Web & HTTP

World-Wide Web Protocols CS 571 Fall Kenneth L. Calvert All rights reserved

CMSC 332 Computer Networking Web and FTP

1-1. Switching Networks (Fall 2010) EE 586 Communication and. September Lecture 10

Chapter 10 Servlets and Java Server Pages

User Manual. Admin Report Kit for IIS 7 (ARKIIS)

CSC358 Week 2. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

Chapter 27 WWW and HTTP Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Chapter 2. Application Layer

Review of Previous Lecture

CSCI-1680 WWW Rodrigo Fonseca

Web Applications. and. Struts 2

CS 43: Computer Networks. Layering & HTTP September 7, 2018

SIP Session Initiation Protocol

Application Level Protocols

VMware Horizon View Deployment

Introduction to JSP and Servlets Training 5-days

RKN 2015 Application Layer Short Summary

Readme File. Hyperion System 9 BI+ Application Builder.NET Release 9.2 Readme. Hyperion System 9 BI+ Application Builder.NET Release 9.

Electronic Mail. Three Components: SMTP SMTP. SMTP mail server. 1. User Agents. 2. Mail Servers. 3. SMTP protocol

How to Configure SSL VPN Portal for Forcepoint NGFW TECHNICAL DOCUMENT

SERVLETS INTERVIEW QUESTIONS

servlets and Java JSP murach s (Chapter 2) TRAINING & REFERENCE Mike Murach & Associates Andrea Steelman Joel Murach

How to Publish Any NetBeans Web App

CS506 today quiz solved by eagle_eye and naeem latif.mcs. All are sloved 99% but b carefull before submitting ur own quiz tc Remember us in ur prayerz

CSSE 460 Computer Networks Group Projects: Implement a Simple HTTP Web Proxy

Configuring HTTP Header Load Balancing

EEC-682/782 Computer Networks I

Configuring Traffic Policies for Server Load Balancing

INTERNET ENGINEERING. HTTP Protocol. Sadegh Aliakbary

Notes beforehand... For more details: See the (online) presentation program.

Life Without NetBeans

The HTTP Protocol HTTP

COSC4377. Chapter 2: Outline

WAS: WebSphere Appl Server Admin Rel 6

Transcription:

Session 9 Deployment Descriptor Http 1 Reading Reading and Reference en.wikipedia.org/wiki/http Reference http headers en.wikipedia.org/wiki/list_of_http_headers http status codes en.wikipedia.org/wiki/http_status_codes http spec www.ietf.org/rfc/rfc2616.txt?number=2616 2 3/10/2014 1

Lecture Objectives Understand that Http is a stateless, request/response protocol Understand the structure of HTTP messages Recognize the kinds of information that can be transmitted in Http headers (both request and response) 3 Web Application Collection of servlets, JSPs, HTML, images, etc. Can be portably deployed to any servlet-enabled web server Usually packaged in a war file Application root The server maps the application name in the URL to the web app root directory WEB-INF files servlets JSPs classes web.xml lib 4 3/10/2014 2

WEB-INF Directory Does not contain files served directly to the client Contains classes and configuration information for the web app WEB-INF/classes contains class files for servlets WEB-INF/lib contains library classes - stored in jar files Many Web Containers support a notation /servlet/xyz for locating the servlet class but use of web.xml is better 5 Deployment Descriptor (web.xml) web.xml file is the deployment descriptor allows Web applications to be deployed An xml file (50+ defined elements) Contains configuration information Provides url string mapping, servlet name/class mapping, security, etc. 6 3/10/2014 3

Http HyperText Transfer Protocol defines communications between a browser and a server Defined in 2 specs (http 1.0 and http 1.1) Defines: Types of messages exchanged (request and response) Syntax of the messages Semantics of the message content Rules for determining how and when a process sends and responds to a message 7 Http Hypertext Transfer Protocol Primary Web application layer protocol uses TCP Implemented as Client program in browser (request message formatting) Server program in Web server (parsing the request method and preparing the response message) Http defines the structure of messages sent between the client and the server Http Http Web server 8 3/10/2014 4

Http Protocol HTTP is a request/response (stateless) protocol A client sends a request to the server in the form of a request method, URI, and protocol version, followed by a MIME-like message containing request modifiers, client information, and possible body content The server responds with a status line, including the message's protocol version and a success (or error) code, followed by a MIME-like message containing server information, entity meta-information, and possible entity-body content. 9 Request Message Format The http request is specified by the request line, a variable number of header fields, and the entity body method sp URL sp Version cr lf header field name sp value cr lf header field name sp value cr lf header field name sp value cr lf cr lf request line header lines Entity body 10 3/10/2014 5

Http Methods OPTIONS request for information concerning communications options (e.g., support of http 1.1) GET retrieve information HEAD identical to GET, except the server does not return a message body POST modify a server resource PUT store the enclosed entity DELETE request that the resource be deleted TRACE response contains the entire message request in the response body CONNECT used in SSL tunneling 11 Http Request From Browser Request line contains the method, URL, and http version Header lines contain http data For the POST method, the form data set is transmitted in the Http entity body, not in the URL 12 3/10/2014 6

Http Response From Server Status line contains version, code and code text Response Mime type Http header info 13 Http Request Message Http messages (other than the body) are written in ASCII text Http request messages consist of: Request line (method, URL, version) Header lines (connection, user-agent, acceptlanguage, etc) Entity body Not used for GET requests Used for uploading files (as in WDG HTML validator) 14 3/10/2014 7

Http Request Headers Accept Accept-charset Accept-encoding Accept-language Authorization Cache-control Connection Content-length Content-type Cookie Expect From Host If-match If-modified-since If-none-match If-range If-unmodified-since Pragma Proxy-authorization Range Referer Upgrade User-agent Via 15 Browser Plugin Most browsers have one or more tools to inspect your http dialog Take a minute to check which tool is installed in your favorite browser Live Http Headers icon in a Chrome browser 16 3/10/2014 8

Http Response Message Http response messages consist of: Status line (protocol version, status code, status message) Header lines (date, server, last-modified, contentlength, content-type) Entity body 17 Http Status Codes Examples: 200 OK 100 Continue 404 Not found You will see this code in your browser if the Web Application cannot find your servlet 18 3/10/2014 9

Http Response Headers Accept-Ranges Age Allow Cache-Control Connection Content-Encoding Content-Language Content-Length Content-MD5 Content-Type Date Etag Expires Last-Modified Location Refresh Server Set-Cookie Via Warning 19 Non-Persistent Connections Used in Http 1.0 For each object on the same server identified in an html page (e.g., image files), Client initiates a TCP connection with the server Client sends an http request message to the server Server sends the http response to the client Server closes the TCP connection Client receives the response message Browsers sometimes lessen the delays of the above by opening multiple simultaneous connections to the server 20 3/10/2014 10

Http 1.1 Most servers and browsers now use Version 1.1 (previous version was 1.0) In HTTP/1.1, the default is that a connection may be used for more than one request/response exchange (persistent connection) Persistent connections can be pipelined (default) in which there are multiple outstanding request over the same connection 21 Setting the Response Header setheader method in HttpServletResponse specifies the header name and the header value resp.setheader( Refresh, 5 ); Header name Convenience methods (correspond to equivalent setheader/parameter combinations) setcontenttype setcontentlength addcookie sendredirect 22 3/10/2014 11

Have You Satisfied the Lecture Objectives? Understand the directory structure of a Web application Understand that Http is a stateless, request/response protocol Understand the structure of HTTP messages Recognize the kinds of information that can be transmitted in Http headers (both request and response) 23 3/10/2014 12