Chapter 16: Networking F Client/Server Communications F Serving Multiple Clients F Applet Clients F Viewing HTML Pages F Retrieving Files from Web Servers.

Slides:



Advertisements
Similar presentations
4.01 How Web Pages Work.
Advertisements

Liang, Introduction to Java Programming, Fifth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 25 Networking.
Web Servers How do our requests for resources on the Internet get handled? Can they be located anywhere? Global?
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved L24 (Chapter 25) Networking.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved L23 (Chapter 25) Networking.
COMP 4—Power Tools for the Mind1 What’s in the box? The Net, the Web, & Hypertext and Creating your Web pages What we’ll cover today How to create your.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved L22 (Chapter 25) Networking.
Internet – Part II. What is the World Wide Web? The World Wide Web is a collection of host machines, which deliver documents, graphics and multi-media.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved Chapter 25 Networking.
Topics in this presentation: The Web and how it works Difference between Web pages and web sites Web browsers and Web servers HTML purpose and structure.
WWW and Internet The Internet Creation of the Web Languages for document description Active web pages.
Browsing the World Wide Web. Spring 2002Computer Networks Applications Browsing Service Allows one to conveniently obtain and display information that.
Computer Science 101 Web Access to Databases Overview of Web Access to Databases.
COMPUTER TERMS PART 1. COOKIE A cookie is a small amount of data generated by a website and saved by your web browser. Its purpose is to remember information.
Web Programming Language Dr. Ken Cosh Week 1 (Introduction)
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
INTRODUCTION TO WEB DATABASE PROGRAMMING
Databases and the Internet. Lecture Objectives Databases and the Internet Characteristics and Benefits of Internet Server-Side vs. Client-Side Special.
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
DATA COMMUNICATION DONE BY: ALVIN SAMPATH CARLVIN SAMPATH.
1 Guide to Novell NetWare 6.0 Network Administration Chapter 11.
1 HTML (Set Up Public Folder) Some material on these slides is taken directly from
OV Copyright © 1998 Ziff-Davis Education, a division of Ziff-Davis Inc. All rights reserved. The Internet World-wide network of computers connected.
1 Computer Communication & Networks Lecture 28 Application Layer: HTTP & WWW p Waleed Ejaz
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.
ASHIMA KALRA IMPORTANT TERMS.  WWW WWW  URL URL  HTTP PROTOCOL HTTP PROTOCOL  PROXIES PROXIES.
Internet Concept and Terminology. The Internet The Internet is the largest computer system in the world. The Internet is often called the Net, the Information.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 4. Understanding the Internet’s Software Structure.
Creating Web Applications Using ASP.NET Chapter Microsoft Visual Basic.NET: Reloaded 1.
Applets Chapter 17.  Java’s big splash onto the scene came in the mid 90’s. The people at Sun Microsystems had managed to work java programs into Web.
HOW WEB SERVER WORKS? By- PUSHPENDU MONDAL RAJAT CHAUHAN RAHUL YADAV RANJIT MEENA RAHUL TYAGI.
Chapter 1: The Internet and the WWW CIS 275—Web Application Development for Business I.
Chapter 4 Networking and the Internet. © 2005 Pearson Addison-Wesley. All rights reserved 4-2 Chapter 4: Networking and the Internet 4.1 Network Fundamentals.
Chapter 34 Java Technology for Active Web Documents methods used to provide continuous Web updates to browser – Server push – Active documents.
2 Copyright © 2004, Oracle. All rights reserved. Running a Forms Developer Application.
Chapter 18 Networking F Client/Server Communications F Simple Client/Server Applications F Serve Multiple Clients F Create Applet Clients F Send and Retrieve.
Chapter 8 Introduction to HTML and Applets Fundamentals of Java.
1 Week 1 l HTML l Applets Applets and HTML. 2 Overview l Applets: Java programs designed to run from a document on the Internet l HTML: Hypertext Markup.
HTML ~ Web Design.
Chapter 13. Applets and HTML HTML Applets Computer Programming with JAVA.
1 Welcome to CSC 301 Web Programming Charles Frank.
CS 7: Introduction to Computer Programming Java and the Internet Sections ,2.1.
1 Chapter 28 Networking. 2 Objectives F To comprehend socket-based communication in Java (§28.2). F To understand client/server computing (§28.2). F To.
Web Design (1) Terminology. Coding ‘languages’ (1) HTML - Hypertext Markup Language - describes the content of a web page CSS - Cascading Style Sheets.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
The Web and Web Services Jim Graham NR 621 Spring 2009.
Introduction to Internet. Chapter 1 Objectives Origins of the Internet Packets and Routers TCP/IP DNS HTTP URL Client-Server.
Chapter 4 Applets Cop Why Applets? WWW makes huge information available to anyone with web browser. Web server send web pages and images to your.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
17 Establishing Dial-up Connection to the Internet Using Windows 9x 1.Install and configure the modem 2.Configure Dial-Up Adapter 3.Configure Dial-Up Networking.
Computer Network Architecture Lecture 6: OSI Model Layers Examples 1 20/12/2012.
1 An Introduction to Dreamweaver and PHP Part C: Setting Dreamweaver up to handle file transferring FTP.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
How Web Servers and The Internet Work The Basic Process.
2 Copyright © 2004, Oracle. All rights reserved. Running a Forms Developer Application.
Liang, Introduction to Java Programming, Ninth Edition, (c) 2013 Pearson Education, Inc. All rights reserved. 1 Chapter 33 Networking.
Web Programming Language
Web Concepts Lesson 2 ITBS2203 E-Commerce for IT.
Warm Handshake with Websites, Servers and Web Servers:
Chapter 2 Client/Server Applications
Some Common Terms The Internet is a network of computers spanning the globe. It is also called the World Wide Web. World Wide Web It is a collection of.
Chapter 18 Networking Client/Server Communications
Distributed Computing, M. L. Liu
Distributed Computing, M. L. Liu
Computer Communication & Networks
Uniform Resource Locator: URL
Computer Networks Protocols
Introduction to JavaScript
Presentation transcript:

Chapter 16: Networking F Client/Server Communications F Serving Multiple Clients F Applet Clients F Viewing HTML Pages F Retrieving Files from Web Servers

Client/Server Communications

Example 16.1: A Client/Server Example F Objective: Write a client to send data to a server. The server receives the data, uses it to produce a result, and then sends the result back to the client. The client displays the result on the console. In this example, the data sent from the client is the radius of a circle, and the result produced by the server is the area of the circle.

Example 16.1, cont. Server CodeRun Client Code Note: Run Server first, then Client. Press Ctrl+C to close the window. Run

Example 16.2: Serving Multiple Clients Server for Multiple Clients Run Server Note: Run Server first, then Client. Press Ctrl+C to close the window. Run Client

Applet Clients Due to security constraints, applets can only connect to the host from which they were loaded. Therefore, the HTML file must be located on the machine on which the server is running. Client CodeServer Code Run Click Run. Type java RegServer and press Enter. Alt+Tab back to this window and click Run again. Type appletviewer regClient.html in the second DOS window. Display the Applet Viewer on top of the server window, and enter student information. To end the server session, press Ctrl+C. (Note: This program cannot be run from the CD.)

Viewing HTML Pages  Given the URL of the page, a Web browser can view an HTML page—for example, F HTTP (Hypertext Transfer Protocol) is the common standard used for communication between a Web server and the Internet. You can open a URL and view a Web page in a Java applet.  A URL is a description of a resource location on the Internet. Java provides a class— java.net.URL —to manipulate URLs.

Creating a URL Instance The following statement creates a Java URL object: try {URL location = new URL(" } catch(MalformedURLException e) {} ViewingWebPages If necessary, click the Run button to access the DOS prompt. Using a JDK1.1-enabled Web browser (such as the HotJava Browser), open the file ViewingWebPages.html and enter a URL. (Begin the URL with This applet cannot run using the Applet Viewer utility. Run

Retrieving Files from Web Servers The following figure shows the process by which an applet reads the files on the Web server:

Example 16.5: Retrieving Remote Data Files F Objective: Compute and display student exam scores. The example is similar to Example Rather than reading the file from the local system, this example reads the file from a Web server. RetrievingRemoteFile If necessary, click the Run button to access the DOS prompt. Using a Web browser (such as the HotJava Browser), enter the following URL: RetrievingRemoteFile.html Run

The Web Server F You need to place three files on the Web server: –RetrievingRemoteFile.class –RetrievingRemoteFile.html –in.dat F For convenience, place them in one directory.