Web server and web browser It’s a take and give policy in between client and server through HTTP(Hyper Text Transport Protocol) Server takes a request.

Slides:



Advertisements
Similar presentations
Hypertext Transfer PROTOCOL ----HTTP Sen Wang CSE5232 Network Programming.
Advertisements

TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 22 World Wide Web and HTTP.
Browsers and Servers CGI Processing Model ( Common Gateway Interface ) © Norman White, 2013.
1 HTML Markup language – coded text is converted into formatted text by a web browser. Big chart on pg. 16—39. Tags usually come in pairs like – data Some.
Object-Oriented Enterprise Application Development Tomcat 3.2 Configuration Last Updated: 03/30/2001.
Servlets and a little bit of Web Services Russell Beale.
Web Servers How do our requests for resources on the Internet get handled? Can they be located anywhere? Global?
HTTP Hypertext Transfer Protocol. HTTP messages HTTP is the language that web clients and web servers use to talk to each other –HTTP is largely “under.
1 Static Web Pages Websites on Servers (The Big Picture) –Apache Tomcat can support static web pages –Primarily intended to support servlets and JSP –Some.
28-Jun-15 Basic Protocols. 2 Sockets Sockets, or ports, are a very low level software construct that allows computers to talk to one another When you.
HTTP Overview Vijayan Sugumaran School of Business Administration Oakland University.
15-Jul-15 Basic Protocols. 2 Sockets Sockets, or ports, are a very low level software construct that allows computers to talk to one another When you.
 What is it ? What is it ?  URI,URN,URL URI,URN,URL  HTTP – methods HTTP – methods  HTTP Request Packets HTTP Request Packets  HTTP Request Headers.
SE-2840 Dr. Mark L. Hornick1 Java Servlet-based web apps Servlet Architecture.
Web Client/Server Communication A290/A590, Fall /09/2014.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
INTRODUCTION TO WEB DATABASE PROGRAMMING
IT 210 The Internet & World Wide Web introduction.
J2EE Web Fundamentals Lesson 1 Introduction and Overview
1 Homework / Exam Exam 3 –Solutions Posted –Questions? HW8 due next class Final Exam –See posted schedule Websites on UNIX systems Course Evaluations.
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
2013Dr. Ali Rodan 1 Handout 1 Fundamentals of the Internet.
Internet Basics Dr. Norm Friesen June 22, Questions What is the Internet? What is the Web? How are they different? How do they work? How do they.
Web application architecture
Chapter 6 The World Wide Web. Web Pages Each page is an interactive multimedia publication It can include: text, graphics, music and videos Pages are.
HTTP HTTP stands for Hypertext Transfer Protocol. It is an TCP/IP based communication protocol which is used to deliver virtually all files and other.
CS441 CURRENT TOPICS IN PROGRAMMING LANGUAGES LECTURE 5_1 George Koutsogiannakis/ Summer
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
Functionality of a web server What does the web server do? Let a user request a resource Find the resource Return something to the user The resource can.
COMP 321 Week 7. Overview HTML and HTTP Basics Dynamic Web Content ServletsMVC Tomcat in Eclipse Demonstration Lab 7-1 Introduction.
Web Server Administration Web Services XML SOAP. Overview What are web services and what do they do? What is XML? What is SOAP? How are they all connected?
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 7: HTTP and CGI Fundamentals of Web Programming.
1 Welcome to CSC 301 Web Programming Charles Frank.
Forms and Server Side Includes. What are Forms? Forms are used to get user input We’ve all used them before. For example, ever had to sign up for courses.
The Internet. Definition: Network of networks. Began in 1969, DOD project called ARPANET. Early 1980’s NSF creates NSFnet NSF takes over both by mid ’80’s.
Copyright © 2006 Pearson Addison-Wesley. All rights reserved. 3-1.
TCP/IP (Transmission Control Protocol / Internet Protocol)
1 Web Servers (Chapter 21 – Pages( ) Outline 21.1 Introduction 21.2 HTTP Request Types 21.3 System Architecture.
2007cs Servers on the Web. The World-Wide Web 2007 cs CSS JS HTML Server Browser JS CSS HTML Transfer of resources using HTTP.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
INTERNET PROTOCOLS. Microsoft’s Internet Information Server Home Page Figure IT2031 UNIT-3.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
CITA 310 Section 2 HTTP (Selected Topics from Textbook Chapter 6)
JS (Java Servlets). Internet evolution [1] The internet Internet started of as a static content dispersal and delivery mechanism, where files residing.
Module: Software Engineering of Web Applications Chapter 2: Technologies 1.
Web Services. 2 Internet Collection of physically interconnected computers. Messages decomposed into packets. Packets transmitted from source to destination.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
CS 6401 The World Wide Web Outline Background Structure Protocols.
Chapter 4 Request and Response. Servlets are controlled by the container.
1 CSC160 Chapter 1: Introduction to JavaScript Chapter 2: Placing JavaScript in an HTML File.
World Wide Web has been created to share the text document across the world. In static web pages the requesting user has no ability to interact with the.
Internet and World Wide Web Introduction to the Internet.
1 Chapter 1 INTRODUCTION TO WEB. 2 Objectives In this chapter, you will: Become familiar with the architecture of the World Wide Web Learn about communication.
4.01 How Web Pages Work.
4.01 How Web Pages Work.
Servlets.
Web Development Web Servers.
Web Languages What Is a Web Page?
Vocabulary Prototype: A preliminary sketch of an idea or model for something new. It’s the original drawing from which something real might be built or.
HTTP: the hypertext transfer protocol
Web Languages What Is a Web Page?
CISC103 Web Development Basics: Web site:
Topic 5: Communication and the Internet
WEB API.
Copyright © 2006 Pearson Addison-Wesley. All rights reserved.
Chapter 27 WWW and HTTP.
Web Design & Development
4.01 How Web Pages Work.
4.01 How Web Pages Work.
Presentation transcript:

Web server and web browser It’s a take and give policy in between client and server through HTTP(Hyper Text Transport Protocol) Server takes a request from client and return something back to client. Take and give routine is done through browser. Web browser provides the platform to access server content on client machine.

Cont’d …..

The client’s request contains the name and address (the URL), of the thing the client is looking for. Usually the server has a lot of “contents” that has to be sent to client. That contents WebPages, images and other resource. The server’s response contains the actual document that the client requested (or an error code if the request could not be processed).

What does a web client does? A web client lets the user request something on the server, and shows the user the result of the request. The browser is the piece of software that knows how to communicate with the server. So from now on, when we use the term client, we usually won’t care whether we’re talking about the human user or the browser app. In other words, the client is the browser app doing what the user asked it to do.

Communication between Server and browser

Clients and servers know HTML and HTTP When a server answers a request, the server usually sends some type of content to the browser so that the browser can display it. Server sends instruction/data to browser in html(hyper text mark up language) Most of the conversations held on the web between clients and servers are held using the HTTP protocol, which allows for simple request and response conversations.

What the hell browser creates ? The browser is a application software reads through the HTML code which information sent by the server to the client according to the client request, creates the web page, and renders it to the user’s display.

What exactly is the HTTP Protocol ? HTTP - It means Hyper Text Transport Protocol. HTTP runs on top of TCP/IP. Then,what is TCT/IP. TCP is responsible for making sure that a file sent from one network node to another ends up as a complete file at the destination, even though the file is split into chunks when it’s sent. IP is the underlying protocol that moves/routes the chunks (packets) from one host to another on their way to the destination.

Continued…… HTTP, then, is another network protocol that has Web-specific features, but it depends on TCP/IP to get the complete request and response from one place to another. The structure of an HTTP conversation is a simple Request/ Response sequence; a browser requests, and a server responds. Key elements of  Request  Responds

Continued…… Key elements of Request  HTTP method (The action to be performed)  The page to access (A URL)  Form parameters (Like arguments to methods) Key elements of Respond  A status code(To check whether the request was successful or not )  The content -type(Text, pictures, movies, HTML and etc)  The content(The actual HTML, images and etc)

Continued……

HTML is part of the HTTP response An HTTP response can contain HTML. HTTP adds header information to the top of whatever content is in the response (in other words, the thing coming back from the server). An HTML browser uses that header info to help process the HTML page. HTTP Body HTTP Header

If that’s the response, what’s in the request? The first ? One of the important features is an HTTP method name. These aren’t Java methods, but the idea is similar. The method name speaks the server the kind of request that’s being made, and how the rest of the message will be formatted. The HTTP protocol has several methods. GET POST

Continued……

Magic Get & Post GET is the simplest HTTP method, and its main job in life is to ask the server to get a resource and send it back. The point of GET is to get something back from the server. POST is a more powerful request. It’s like a GET plus plus. With POST, you can request something and at the same time send form data to the server (later in this chapter we’ll see what the server might do with that data).

Some other Http methods besides get & post Those are the two big ones that everybody uses. But there are a few rarely used methods (and Servlets can handle them) including HEAD, TRACE, PUT, DELETE, OPTIONS, and CONNECT.

Get or Post which one is better The total amount of characters in a GET is really limited, hence it is not useful for bigger data. The data you send with the GET is appended to the URL up in the browser bar. So, whatever you send is exposed. So there is less security in Get method. The user can’t bookmark a form submission if you use POST instead of GET.

URL explanations URL - Uniform Resource Locators

Protocol, Server & Url Protocol set of rules which tells the server how communications will be held. Server is the unique name of the physical server you’re looking for. This name maps to a unique IP address. IP addresses are numeric and take the form “xxx.yyy.zzz.aaa”. You can specify an IP address here instead of a server name, but a server name is a lot easier to remember. URL is optional. A single server supports many ports. A server application is identified by a port. If you don’t specify a port in your URL, then port 80 is the default, and as luck would have it, that’s the default port for web servers.

Path & Resources Path : The path to the location, on the server, of the resource being requested. Because most of the early servers on the web ran Unix, Unix syntax is still used to describe the directory hierarchies on the web server. Resource : The name of the content being requested. This could be an HTML page, a servlet, an image, PDF, music, video, or anything else the server feels like serving. If this optional part of the URL is left out, most web servers will look for index.html by default.

Reserved Ports Be care full, never fix your port to these reserved ports.

As web Server Loves to love to serve Static web pages As a static page sits there in a directory. The server finds and hands it back to client as it is. Each and every client sees same thing. The page goes client exactly same as it was placed in the server.

Servlet There are many advantages to using Java over Perl for the things you want to do with CGI. Performance, for one thing. With Perl, the server has to launch a heavy- weight process for each and every request for that resource! Servlets stay loaded and client requests for a Servlet resource are handled as separate threads of a single running Servlet.

Tier Architecture Tier architecture is three types -  Single tier architecture  Two tier architecture  Three tier architecture Single tier architecture combines all Presentation,logic and data and keep at one place. There is no separation of data, logic and presentation. Single tier Architecture

Servlet Demystified (write, deploy, run) in Tomcat apache server However we are here working on Tomcat apache server. So to work on tomcat we have to create a directory tree as like below under the webapps.

Continued…. Well to deploy your Servlet program you have to create a folder according your choice inside of the webapps folder. example - holiday Then create one more folders in between the folder you just created inside(i.e. holiday) of webapps.  WEN-INF Now in WEB-INF folder we create another folder which name most be Classes keep all XML file which will help us to connect the java file(i.e x.class) which are inside of Classes folder

Continued…. In Classes folder all java compiled Servlet files will be stored. We can create our own package inside of Classes folder.

Full tree structure of deployment directory WebAppDirectoryWEB-INFClassesSome packagesLibtldsMETA-INFMANIFEST.MF