Fall 2000C.Watters1 World Wide Web and E-Commerce Servers & Server Side Processing.

Slides:



Advertisements
Similar presentations
Lecture plan Information retrieval (from week 11)
Advertisements

Java Server Pages (JSP)
DT228/3 Web Development WWW and Client server model.
Languages for Dynamic Web Documents
Building Applications using ASP.NET and C# / Session 1 / 1 of 21 Session 1.
Servlets and a little bit of Web Services Russell Beale.
15 Chapter 15 Web Database Development Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
28/1/2001 Seminar in Databases in the Internet Environment Introduction to J ava S erver P ages technology by Naomi Chen.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Server Side Web Technologies: Part 2.
INTERNET DATABASE. Internet and E-commerce Internet – a worldwide collection of interconnected computer network Internet – a worldwide collection of interconnected.
Introduction to Web Interface Technology (CSE2030)
Active Server Pages Chapter 1. Introduction Understand how browsers and servers interacted when the Web was young Understand what early Internet and intranet.
1 Web Search Interfaces. 2 Web Search Interface Web search engines of course need a web-based interface. Search page must accept a query string and submit.
1 CS6320 – Why Servlets? L. Grewe 2 What is a Servlet? Servlets are Java programs that can be run dynamically from a Web Server Servlets are Java programs.
Definitions, Definitions, Definitions Lead to Understanding.
Introduction to Web Interface Technology (CSE2030)
1 The World Wide Web. 2  Web Fundamentals  Pages are defined by the Hypertext Markup Language (HTML) and contain text, graphics, audio, video and software.
CGI Programming: Part 1. What is CGI? CGI = Common Gateway Interface Provides a standardized way for web browsers to: –Call programs on a server. –Pass.
2440: 141 Web Site Administration Web Server-Side Programming Professor: Enoch E. Damson.
SE-2840 Dr. Mark L. Hornick1 Java Servlet-based web apps Servlet Architecture.
Christopher M. Pascucci Basic Structural Concepts of.NET Browser – Server Interaction.
DAT602 Database Application Development Lecture 15 Java Server Pages Part 1.
Server Side Scripting Norman White. Where do we do processing? Client side – Javascript (embed code in html) – Java applets (send java program to run.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
INTRODUCTION TO WEB DATABASE PROGRAMMING
1 Servlet How can a HTML page, displayed using a browser, cause a program on a server to be executed?
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
Beyond DHTML So far we have seen and used: CGI programs (using Perl ) and SSI on server side Java Script, VB Script, CSS and DOM on client side. For some.
Comp2513 Forms and CGI Server Applications Daniel L. Silver, Ph.D.
CSCI 6962: Server-side Design and Programming Course Introduction and Overview.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
Chapter 33 CGI Technology for Dynamic Web Documents There are two alternative forms of retrieving web documents. Instead of retrieving static HTML documents,
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
Basics of Web Databases With the advent of Web database technology, Web pages are no longer static, but dynamic with connection to a back-end database.
Java Omar Rana University of South Asia. Course Overview JAVA  C/C++ and JAVA Comparison  OOP in JAVA  Exception Handling  Streams  Graphics User.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 23 How Web Host Servers Work.
CSU - DCE Advanced Perl CGI Operation - Fort Collins, CO Copyright © XTR Systems, LLC Introduction to the Common Gateway Interface (CGI) on the.
Java CGI Lecture notes by Theodoros Anagnostopoulos.
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 7: HTTP and CGI Fundamentals of Web Programming.
2-1 WEB DATABSE INTERFACING Colorado Technical University IT420.
Web Pages with Features. Features on Web Pages Interactive Pages –Shows current date, get server’s IP, interactive quizzes Processing Forms –Serach a.
Active Server Pages  In this chapter, you will learn:  How browsers and servers interacted on the Internet when the Internet first became popular 
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Chapter 6 Server-side Programming: Java Servlets
Mainframe (Host) - Communications - User Interface - Business Logic - DBMS - Operating System - Storage (DB Files) Terminal (Display/Keyboard) Terminal.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
CGI Common Gateway Interface. CGI is the scheme to interface other programs to the Web Server.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
ASP (Active Server Pages) by Bülent & Resul. Presentation Outline Introduction What is an ASP file? How does ASP work? What can ASP do? Differences Between.
David Lawrence 7/8/091Intro. to PHP -- David Lawrence.
Jan 2001C.Watters1 World Wide Web and E-Commerce Client Side Processing.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
ECMM6018 Enterprise Networking for Electronic Commerce Tutorial 7
Fall 2000C.Watters1 World Wide Web and E-Commerce Clients & Client Side Processing.
CITA 310 Section 7 Installing and Testing a Programming Environment (Textbook Chapter 7)
JS (Java Servlets). Internet evolution [1] The internet Internet started of as a static content dispersal and delivery mechanism, where files residing.
JSP Server Integrated with Oracle8i Project2, CMSC691X Summer02 Ching-li Peng Ying Zhang.
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
How CGI and Java Servlets are Run By David Stein 14 November 2006.
Bayu Priyambadha, S.Kom. Static content  Web Server delivers contents of a file (html) 1. Browser sends request to Web Server 3. Web Server sends HTML.
Fall 2000C.Watters1 World Wide Web and E-Commerce Servers & Server Side Processing.
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.
A Presentation Presentation On JSP On JSP & Online Shopping Cart Online Shopping Cart.
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.
WWW and HTTP King Fahd University of Petroleum & Minerals
PHP / MySQL Introduction
Introduction to Servlets
Presentation transcript:

Fall 2000C.Watters1 World Wide Web and E-Commerce Servers & Server Side Processing

Fall 2000C.Watters2 Objectives  Understand the server’s role  Understand how processing is executed on the server for dynamic web page content  CGI scripts  Active server pages  Database access  Servlets

Fall 2000C.Watters3 Client-Server Model

Fall 2000C.Watters4 HTTP Connection 1. Client –makes an HTTP request for a web page –makes a TCP/IP connection 2. Server accepts request –Does any processing required –sends page as HTTP response 3. Client downloads page 4. Server breaks the connection

Fall 2000C.Watters5 Server Side Processing CGI – server applications Server side scripts servlets JDBC/ODBC and databases

Fall 2000C.Watters6 Servers What does a server actually do 1.gets up and running in “listening mode” creates a socket bound to its IP address & waits 2. Handles requests detects attempt by client to connect creates a new socket for communication with client processes request –retrieve file –run cgi script closes socket socket is an abstract representation of a network endpoint.

Fall 2000C.Watters7 Dynamic Content Catalog for NS BlueRocks Peggys Cove Lunenburg Get province from form Query database Generate tags around the query results Send this text as body of HTTP response Province NS BrowserServer ONT Catalog for Ontario Niagara Falls Bruce Trail Goderich

Fall 2000C.Watters8 CGI & scripts  CGI - Common Gateway Interface  allows data from forms to be used by programs on the server  script is a program on the server  perl or C or C++ etc.  data returned to client as html document  may interact with a DBMS on server

Fall 2000C.Watters9 What does an HTTP response look like? Server response = Header + object file (generally) Header object file Plain text about datadata

Fall 2000C.Watters10 Forms and Data Forms are part of HTML document Price: user enters data or selects options Data from form goes to server program called Submit Price:

Fall 2000C.Watters11 Form calling Simple CGI Example hi Do it! Where to find the program? How to get data to the server

Fall 2000C.Watters12 Script for hello2.cgi #!/opt/bin/perl print "Content-type: text/html\n\n"; print " \n"; print " Hello \n"; print " \n"; print " Hello, Ottawa \n"; Print “ print " \n"; try it Response doc type HTML doc

Fall 2000C.Watters13 Getting at Databases  ODBC - Open DataBase Connectivity  JDBC - java based  script programs can use these to make database queries from server databases  Oracle, access, etc  results are sent back to client as html doc

Fall 2000C.Watters14 Perl example to ORACLE print " \n"; print " Calendar \n"; print " Course description enrol "; &SetOracle; &RunSQL("Select * from Calendar"); &StopOracle; print " \n";

Fall 2000C.Watters15 BEING STATELESS!! Each http call is a new connection SO?? –A new version of your script is run each time –No memory of previous events –pretty hard to implement a shopping cart when it gets emptied everytime you contact the server!

Fall 2000C.Watters16 Example Client puts tshirt in shopping cart form on web page Cart.cgi is called Makes purchase (Tshirt) Generates new page &form Add a book Cart.cgi is called Makes purchase ( book)

Fall 2000C.Watters17 Maintaining State in a Stateless Systems  Use your script to write data to a temporary file on the server and to start each time by reading any data in that file  use javascript to process activities in a given session and send results to server at end only  Hide data in forms and send it back and forth  keep everything in a database  Use Servlets  gets tricky!!

Fall 2000C.Watters18 Servlets  java applications that are part of the server  always available (faster) than cgi scripts  provide continuity (state) for clients  written in java  can use JDBC to access databases  Used for: shopping, search, certificates, agents, portals

Fall 2000C.Watters19 Other ways to process on Server to generate dynamic data for web pages  Server side includes  Active server pages  Java server pages

Fall 2000C.Watters20 Server Side Include Files Server Side Includes (.shtml) Active Server Pages (.asp) Java Server Pages (.jsp) These functions are performed before any data are sent to the browser

Fall 2000C.Watters21 Server Side Includes (SSI) Shtml extension What happens: –Server gets request for a page (.shtml) –Server checks the page for SSI commands –Server executes those commands and inserts new values into the page –Server sends the new page to the Browser

Fall 2000C.Watters22 SSI example: ssitest.shtml Getting the date from the server as I need it I could do other things as well a stock quote an expected wait time a price check etc

Fall 2000C.Watters23 Server Pages Active Server Pages (microsoft).asp Java Server Pages (Sun).jsp Instructions for the server are included in the web page The server notices the extension and looks for those instructions and executes them!

Fall 2000C.Watters24 Active server Page example:test1.asp Test1 = #12:00:00 AM# and Time Good Morning Ottawa Hello Everyone

Fall 2000C.Watters25 JSP (Java server pages)

Fall 2000C.Watters26 Expression. Your hostname:. Scriptlet. <% out.println("Attached GET data: " + request.getQueryString()); %> Declaration (plus expression). Accesses to page since server reboot: Directive (plus expression). Current date:

Fall 2000C.Watters27

Fall 2000C.Watters28

Fall 2000C.Watters29 Hello, User

Fall 2000C.Watters30 NOT the same as Active X Active X Components are “roughly” the same as applets

Fall 2000C.Watters31 Recap Servers process browser requests CGI can be used to run applications on the server from web pages including accessing DBMS data Servers are naturally stateless Servlets (&other tricks)can be used to maintain state Server side includes can be used to dynamically create web page content before sending the page to the browser Agents are little independent pieces of software