The Java Network API and Parsing HTML java.net.* javax.swing.text.html.*

Slides:



Advertisements
Similar presentations
Chapter 6 Server-side Programming: Java Servlets
Advertisements

Enabling Secure Internet Access with ISA Server
Basic Internet Terms Digital Design. Arpanet The first Internet prototype created in 1965 by the Department of Defense.
Network Programming Chapter 11 Lecture 6. Networks.
Location based Streaming Topics for our 1 st presentation  Thesis Description  Positioning System  Streaming over positioning  Questions Session.
Prepared By E. Musa Alyaman1 URLs, InetAddresses, and URLConnections Chapter 9.
Advanced Java Class Network Programming. Network Protocols Overview Levels of Abstraction –HTTP protocol: spoken by Web Servers and Web Clients –TCP/IP:
Interfaces finalized Hashing Ch. 6 CLR (see class resources page)
Getting a Web Page (And what to do once you’ve got it)
How the web works: HTTP and CGI explained
Session Management A290/A590, Fall /25/2014.
1 Web Content Delivery Reading: Section and COS 461: Computer Networks Spring 2007 (MW 1:30-2:50 in Friend 004) Ioannis Avramopoulos Instructor:
Introduction 2: Internet, Intranet, and Extranet J394 – Perancangan Situs Web Program Sudi Manajemen Universitas Bina Nusantara.
Application Layer  We will learn about protocols by examining popular application-level protocols  HTTP  FTP  SMTP / POP3 / IMAP  Focus on client-server.
Web Proxy Server Anagh Pathak Jesus Cervantes Henry Tjhen Luis Luna.
© 2008 Zend Technologies; made available under the EPL v March 2008 PDT – The PHP Development Toolkit Assaf Almaz, PDT co-Project Leader Zend Technologies.
1 Enabling Secure Internet Access with ISA Server.
HTML Comprehensive Concepts and Techniques Intro Project Introduction to HTML.
Computer Concepts 2014 Chapter 7 The Web and .
1. 2 What’s New in NetBeans IDE What is NetBeans IDE?  Ready to use out of the box  Support for latest Java specifications & standards  Other.
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
An program As a simple example of socket programming we can implement a program that sends to a remote site As a simple example of socket.
Computer Networks  Network - A system of computers interconnected in order to share information.  Data transmission - consists of sending and receiving.
Comp2513 Forms and CGI Server Applications Daniel L. Silver, Ph.D.
Application Protocols: HTTP CSNB534 Semester 2, 2007/2008 Asma Shakil.
Web application architecture
Lecture#2 on Internet and World Wide Web. Internet Applications Electronic Mail ( ) Electronic Mail ( ) Domain mail server collects incoming mail.
Nutch in a Nutshell (part I) Presented by Liew Guo Min Zhao Jin.
World Wide Web Hypertext model Use of hypertext in World Wide Web (WWW) WWW client-server model Use of TCP/IP protocols in WWW.
An program As a simple example of socket programming we can implement a program that sends to a remote site As a simple example of socket.
4-Oct-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 send.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 23 How Web Host Servers Work.
Chapter 1: The Internet and the WWW CIS 275—Web Application Development for Business I.
20-753: Fundamentals of Web Programming 1 Lecture 1: Introduction Fundamentals of Web Programming Lecture 1: Introduction.
Chapter 18 Networking F Client/Server Communications F Simple Client/Server Applications F Serve Multiple Clients F Create Applet Clients F Send and Retrieve.
Sockets process sends/receives messages to/from its socket
CS 241 Section (04/19/12). MP8  Web Server  Due: Tuesday, May 1 st, 11:59pm  What will you be doing?  Creating a web-server in C that serves HTML.
CS 11 java track: lecture 6 This week: networking basics Sockets Vectors parsing strings.
Java Programming: Advanced Topics 1 Networking Programming Chapter 11.
TCP/IP (Transmission Control Protocol / Internet Protocol)
Java Servlet API CGI / HTTP Concepts Java Servlet API.
1 WWW. 2 World Wide Web Major application protocol used on the Internet Simple interface Two concepts –Point –Click.
1 University of Qom Information Retrieval Course Web Search (Spidering) Based on:
WEB SERVER Mark Kimmet Shana Blair. The Project Web Server Application  Receives request for web pages or images from a client browser via the internet.
CS2852 Week 3, Class 2 Today Stacks Queues SE-2811 Slide design: Dr. Mark L. Hornick Content: Dr. Hornick Errors: Dr. Yoder 1.
Digital Literacy Concepts and basic vocabulary. Digital Literacy Knowledge, skills, and behaviors used in digital devices (computers, tablets, smartphones)
Web Server.
27.1 Chapter 27 WWW and HTTP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Internet Applications (Cont’d) Basic Internet Applications – World Wide Web (WWW) Browser Architecture Static Documents Dynamic Documents Active Documents.
RESTful Web Services What is RESTful?
CSI 3125, Preliminaries, page 1 Networking. CSI 3125, Preliminaries, page 2 Networking A network represents interconnection of computers that is capable.
Data Communications and Computer Networks Chapter 2 CS 3830 Lecture 7 Omar Meqdadi Department of Computer Science and Software Engineering University of.
The Internet, Fourth Edition-- Illustrated 1 The Internet – Illustrated Introductory, Fourth Edition Unit B Understanding Browser Basics.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Search Engine and Optimization 1. Introduction to Web Search Engines 2.
Network Programming. These days almost all devices.
Web Page Design The Basics. The Web Page A document (file) created using the HTML scripting language. A document (file) created using the HTML scripting.
Internet The internet is the largest computer network system in the world. It consists of many smaller networks connected together by a global public.
Application layer tcp/ip
Chapter 1 Introduction to HTML.
Chapter 18 Networking Client/Server Communications
14-мавзу. Cookie, сеанс, FTP и технологиялари
CSCD 330 Network Programming Spring
URL in Java C343 Lab (Week 13).
Servlet APIs Every servlet must implement javax.servlet.Servlet interface Most servlets implement the interface by extending one of these classes javax.servlet.GenericServlet.
Hyper Text Transfer Protocol
WinINet Windows Internet.
CSCD 330 Network Programming Spring
Information Retrieval and Web Design
Presentation transcript:

The Java Network API and Parsing HTML java.net.* javax.swing.text.html.*

Administrivia MondoHashMap due today Late time counting now... Milestone 2 due Feb 9 (next Wed), start of class 8 days... Office hours on Wed truncated 9:00-10:15 AM Or send mail for another time

Design exercise Given: A LinkedList class, with methods size(), prepend(), append(), first(), last(), iterator(), removeFirst(), and removeLast() Design: A sub-class, StackGenList, that supports a method getStackView() which returns a Stack object that, in turn, supports push(), pop(), topElement(), and depth() Constraints: You do not have access to the internals of the LinkedList (it has no protected members) You may not copy any of the LinkedList data The Stack view and the LinkedList must always remain synchronized

M2 timeline Today: understand java.net.URL, javax.swing.html.HTMLEditorKit, and javax.swing.html.HTMLEditorKit.ParserCallback Tomorrow: write your own web page fetch and parse demo program(s); start web spider Wed-Fri: extend spider, work on coverage; cycle detection; filtering By Fri: be able to spider CS web site; build and save REVERSE INDEX Weekend: testing; debugging; refinement Early next week: performance testing and documentation

Fetching a web page Core utility: java.net.URL Abstract representation of resource name and location Parses and stores parts of URL Brokers different protocol types Accessing content: java.net.URLConnection Opens, tracks, closes network connections Provides content data Provides meta-data

The web fetch cycle URL u=new URL(“ Breaks out parts of URL protocol: “http” host: “ authority: “ file: “/~terran” path: “/~terran” Sets protocol handler handler: HttpHandler URLConnection con=u.openConnection() Generates protocol-specific connection handler return new handler.openConnection(this) return new HttpURLConnection(this) con.connect() Opens socket connection to hostRequests metadata con.getHeaderFields() Requests resource content; returns stream view of data con.getInputStream()