/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems.

Slides:



Advertisements
Similar presentations
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 10 Servlets and Java Server Pages.
Advertisements

M-V-C for web applications. Model for Web Applications model consists of data and system state database tables –persistent data session information –current.
/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems.
/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems.
Lecture plan Information retrieval (from week 11)
/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems.
 Copyright Wipro Technologies JSP Ver 1.0 Page 1 Talent Transformation Java Server Pages.
DT228/3 Web Development WWW and Client server model.
Languages for Dynamic Web Documents
Copyright 2004 Monash University IMS5401 Web-based Systems Development Topic 2: Elements of the Web (g) Interactivity.
Servlets and a little bit of Web Services Russell Beale.
WEB1P servintro1 Introduction to servlets and JSP Dr Jim Briggs.
An introduction to Java Servlet Programming
B.Sc. Multimedia ComputingMedia Technologies Database Technologies.
Liang, Introduction to Java Programming, Sixth Edition, (c) 2005 Pearson Education, Inc. All rights reserved Chapter 34 Servlets.
JSP Architecture  JSP is a simple text file consisting of HTML or XML content along with JSP elements  JSP packages define the interface for the compiled.
Servlets Compiled by Dr. Billy B. L. Lim. Servlets Servlets are Java programs which are invoked to service client requests on a Web server. Servlets extend.
Java Servlets. What Are Servlets? Basically, a java program that runs on the server Basically, a java program that runs on the server Creates dynamic.
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
Java Server Pages B.Ramamurthy. Topics for Discussion 8/20/20152 Inheritance and Polymorphism Develop an example for inheritance and polymorphism JSP.
Sys Prog & Scripting - HW Univ1 Systems Programming & Scripting Lecture 15: PHP Introduction.
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)
Dynamic Web Sites Chris North cs3724: HCI. Presentations matt ketner, sam altman, mike gordon Vote: UI Hall of Fame/Shame?
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
Java Omar Rana University of South Asia. Course Overview JAVA  C/C++ and JAVA Comparison  OOP in JAVA  Exception Handling  Streams  Graphics User.
11/16/2012ISC329 Isabelle Bichindaritz1 Web Database Application Development.
Chapter 17 - Deploying Java Applications on the Web1 Chapter 17 Deploying Java Applications on the Web.
Chapter 5 Java Servlets. Objectives Explain the nature of a servlet and its operation Use the appropriate servlet methods in a web application Code the.
CMPUT 391 – Database Management Systems Department of Computing Science University of Alberta CMPUT 391 Database Management Systems Web based Applications,
20-753: Fundamentals of Web Programming Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 7: HTTP and CGI Fundamentals of Web Programming.
Web Server Programming 1. Nuts and Bolts. Premises of Course Provides general introduction, no in-depth training Assumes some HTML knowledge Assumes some.
10/13/2015 ©2006 Scott Miller, University of Victoria 1 Content Serving Static vs. Dynamic Content Web Servers Server Flow Control Rev. 2.0.
Web Server Programming 3. Server side includes. HTML+ (‘hole’) technologies Uses ‘HTML+”, HTML (or XML) extended with code. Very many different varieties.
Chapter 6 Server-side Programming: Java Servlets
1 CS122B: Projects in Databases and Web Applications Spring 2015 Notes 03: Web-App Architectures Professor Chen Li Department of Computer Science CS122B.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
1 MSCS 237 Overview of web technologies (A specific type of distributed systems)
Copyright © 2002 ProsoftTraining. All rights reserved. JavaServer Pages.
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.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
1 Java Servlets l Servlets : programs that run within the context of a server, analogous to applets that run within the context of a browser. l Used to.
Middleware 3/29/2001 Kang, Seungwoo Lee, Jinwon. Description of Topics 1. CGI, Servlets, JSPs 2. Sessions/Cookies 3. Database Connection(JDBC, Connection.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, Responds oriented other.
1 Introduction to Servlets. Topics Web Applications and the Java Server. HTTP protocol. Servlets 2.
Advanced Java Session 6 New York University School of Continuing and Professional Studies.
Fall 2000C.Watters1 World Wide Web and E-Commerce Servers & Server Side Processing.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, written in Java code, that.
 Web pages originally static  Page is delivered exactly as stored on server  Same information displayed for all users, from all contexts  Dynamic.
ASP-2-1 SERVER AND CLIENT SIDE SCRITPING Colorado Technical University IT420 Tim Peterson.
UMass Lowell Computer Science Java and Distributed Computing Prof. Karen Daniels Fall, 2000 Lecture 21 Java Servlets Wed. 11/22/00 based on material.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
1 Chapter 22 World Wide Web (HTTP) Chapter 22 World Wide Web (HTTP) Mi-Jung Choi Dept. of Computer Science and Engineering
National College of Science & Information Technology.
CS122B: Projects in Databases and Web Applications Spring 2017
CS122B: Projects in Databases and Web Applications Winter 2017
Servlets.
WWW and HTTP King Fahd University of Petroleum & Minerals
Servlet Fudamentals.
Java Servlets By: Tejashri Udavant..
Java Servlets.
Servlet API and Lifecycle
Chapter 26 Servlets.
Chapter 27 WWW and HTTP.
CS122B: Projects in Databases and Web Applications Winter 2018
Introduction to Servlets
CS122B: Projects in Databases and Web Applications Spring 2018
Servlet APIs Every servlet must implement javax.servlet.Servlet interface Most servlets implement the interface by extending one of these classes javax.servlet.GenericServlet.
CS122B: Projects in Databases and Web Applications Winter 2019
Presentation transcript:

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Web programming Technologies, tools & languages

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Client Side Programming Extension of standard browser features Interaction (‘mouse over’ displays) Communication (uploading, streaming data) Animation Simulation

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Client Side Technologies Scripting (e.g. Javascript) Applets VRML Flash, etc. Built in browser or added using plugins or separate programs

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Server Activities Standard: transfer of documents Additional: Maintenance of changeable information (hit counters) Processing of user input (calculations) Use of external services (other servers, DBs) Complex tasks (shopping carts, questionaires)

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Web Applications

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Server Side Extensions Data retrieval (databases, web servers) Presentation generation on the fly Sessions (maintaining state) Transaction handling / security Adaptation / shopping carts

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Web service example Amazon book store: Browsing Searching Personalized notification Shopping cart Ordering & accounting Order tracking

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Web Services Document based Simple files Servlets JSP XML + XSLT (Cocoon) RPC based

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Web Application Tasks Application management Coordination of tasks Change management User management Username & password Preferences & permissions Session management Login & authorisation Ordering & accounting Resource management (e.g. DBMS)

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Application Management Contexts: shared accessibility of data and programs In Java: interface ‘ServletContext’: Shared servlets and context attributes. Associated with specific namespace in server

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e User Management Storing and maintaining: User ID & password Preferences Personal history

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e session management persistency of sessions: possibilities: stateless “session”: server doesn’t remember any state (state changes through links) e.g. tic tac toe session: server keeps state (identifiable; resumable) during this session permanently client may also keep state

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Components of User Requests URL: Host / server / port ID. Task (servlet) id. path info Request parameters (GET method) HTTP headers Cookies Message body: Request parameters (POST method)

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Components of Server Responses Data stream (incl. URLs) HTTP headers Cookies

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e User Management User database combined with: ID cookies Explicit logins + URLs Cookies containing user data

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Session Management With Cookies a request arrives that isn’t part of a session yet the server generates a “cookie” with state info the server sends it with the document (in a HTTP response header) the client remembers this cookie the client sends it along with subsequent URLs (in a HTTP request header) the server identifies the client by the cookie

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e URLs vs cookies URLs must be short URLs are public (can be guessed) URLs are always supported by the client cookies must be optional: clients may refuse them

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Server Side Technologies CGI + C++, Perl, etc. (JAVA) servlets Fill in the holes: JSP, ASP, PHP Application support: Cocoon, HTL

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Common Gateway Interface (CGI) Activates separate process Request: - command filename +arguments - environment variables Response: - HTTP headers - document content

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Servlets Standard for interfacing web client with web server. Set of JAVA packages (javax.servlet, javax.servlet.http) Way of interfacing clients with back-end services (JDBC servers, etc.) Way to implement proxies (e.g. for applets)

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e JAVA servlets Alternative for CGI scripts: JAVA technology Servlet support integrated in server JAVA threads: no independent process Sharing of resources with server Protocol independent Security issues: JAVA sandbox

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Servlet Example public class xyz extends HttpServlet { public void init(ServletConfig config) {…} public void doGet(HttpServletRequest request, HttpServletResponse response) {…} public void doPost(HttpServletRequest request, HttpServletResponse response) {…} etc. }

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Application Deployment TomCat Configuration file: web.xml Context: context root name context root path parameters Servlets: servlet name (alias path) servlet class initial parameters filter specification & configuration

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Embedding in Webserver Configuration file: XYZServlet xyz param1 abc

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Context Management Initial parameters getInitParameterNames() getInitParameter() Attribute objects setAttribute() getAttributeNames() setAttribute() removeAttribute() Event listeners in attribute objects

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Session Management Session = client * web application * time frame Life cycle management: getSession() Time out Invalidate() Session state (e.g. JAVA session attributes)

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Fill-in-the-hole technologies HTML or XML + program code JSP: HTML / XML + JAVA + XML ASP: HTML + VBScript / Perl / Jscript PHP: HTML + special language XSP, ColdFusion, etc.

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e HTML Interleaving <a href= >text

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e JSP SUN standard For HTML or XML Processing instruction tags XML extensions: predefined ‘ ’, etc. custom Uses JAVA Gives access to Servlet packages

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Most Important JSP Tags

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e JSP: Implicit Objects config – ServletConfig object request – ServletRequest object response – ServletResponse object application – ServletContext object session – HttpSession object out – Writer for output data

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e JSP + XML Alternative syntax: JSP: XML: a = b; Tag libraries … Directives <jsp:plugin type=“applet” code=“xyz” …

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e ASP Microsoft product Extends HTML pages Tags: Uses VBScript, PerlScript (=Perl) or Jscript Built-in objects: Application, ASPError, Request, Response, Server, Session

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Chaining of Operations

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Combined Transformations D o = U S (P S (S))(U Q (P Q (Q))(D i ))

/ department of mathematics and computer sciencedepartment of mathematics and computer science / architecture of information systems architecture of information systems technische universiteit eindhoven TU/e Next Generation Web Programming WSDL: Web Services Description Language