JSP-AJAX

Document Sample
JSP-AJAX Powered By Docstoc
					HTTP, JSP, and AJAX

          Ang Chen

    CUI, University of Geneva


  PINFO 05-06 May 5, 2006
Outline
  Introduction
      Overview
      WEB 1.0 vs WEB 2.0
  HTTP, CGI, Web Application Model
    HTTP
    Common Gateway Interface (CGI)
    Web Application Model
    Summary
  Servlet & JSP
     Servlet
     Java Server Pages
  AJAX
    Using AJAX
  Summary
  Resources
Outline
  Introduction
      Overview
      WEB 1.0 vs WEB 2.0
  HTTP, CGI, Web Application Model
    HTTP
    Common Gateway Interface (CGI)
    Web Application Model
    Summary
  Servlet & JSP
     Servlet
     Java Server Pages
  AJAX
     Using AJAX
  Summary
  Resources
Overview

  This presentation provides a brief introduction of:
      HTTP, CGI, Web Application Model
      Servlets & JSP
      AJAX
  What it does not include (many!) but can be found in references:
      Complete technical details, APIs: e.g Taglib, JavaScript,
      HTML, DOM
      How to configure Tomcat and deploy applications
      How to manage sessions with cookies and URL rewriting.
      How to use JavaBeans in JSP
      Development Frameworks with JSP and AJAX, e.g. Struts,
      various AJAX frameworks.
WEB 1.0 vs WEB 2.0


  Technically, they are the same. ”Old wine in a new bottle.”
  But, the Use Cases are different.
  WEB 1.0:
      User browses the content on the server(the Web), the
      server(the Web) return the desired content.
      The Internet Content Provider(ICP) provides the contents to
      clients.
  WEB 2.0:
      User reads and write content from/to the Web.
      Most contents are provided by Internet users. The Web as
      Platform.
WEB 2.0


  Example of WEB 2.0:
      WebBlog, Social Networks, Contents Sharing, Wiki, RSS
      (Really Simple Syndication), PodCast
      Google Maps, Gmail, AdSense, Writely, Flickr, del.icio.us,
      eBay, Amazon, BitTorrent
  Keywords of WEB 2.0:
      Sharing, Tagging, Syndication, Blogging,
      Services, Simplicity, Re-usability
  Note that sometimes the term WEB 2.0 is more marketing than its
  real sense.
Outline
  Introduction
      Overview
      WEB 1.0 vs WEB 2.0
  HTTP, CGI, Web Application Model
    HTTP
    Common Gateway Interface (CGI)
    Web Application Model
    Summary
  Servlet & JSP
     Servlet
     Java Server Pages
  AJAX
     Using AJAX
  Summary
  Resources
HTTP: Hypertext Transfer Protocol I



     A generic protocol for data transfer across the Internet, RFC
     2616.
     HTTP Extensions and HTTP 1.1 are stable specifications and
     W3C has closed the HTTP Activity.
     Client/Server architecture: the client sends a request, the
     server responses. The protocol consists of several parts:
     communication, access authentication, message format,
     encoding, caching, etc.
HTTP: Hypertext Transfer Protocol I



     A generic protocol for data transfer across the Internet, RFC
     2616.
     HTTP Extensions and HTTP 1.1 are stable specifications and
     W3C has closed the HTTP Activity.
     Client/Server architecture: the client sends a request, the
     server responses. The protocol consists of several parts:
     communication, access authentication, message format,
     encoding, caching, etc.
HTTP: Hypertext Transfer Protocol I



     A generic protocol for data transfer across the Internet, RFC
     2616.
     HTTP Extensions and HTTP 1.1 are stable specifications and
     W3C has closed the HTTP Activity.
     Client/Server architecture: the client sends a request, the
     server responses. The protocol consists of several parts:
     communication, access authentication, message format,
     encoding, caching, etc.
HTTP: Hypertext Transfer Protocol II


  To write Web applications, we are interested in the most used
  communication primitives between the client(browser) and the
  Web server:
      GET: retrieve the information identified by the Request-URI.
      POST: providing a block of data to server, e.g. posting a
      message, filling a form, etc.
      PUT: request to store the enclosed entity under the
      Request-URI, e.g. uploading a file.
      DELETE: request to delete the resource identified by the
      Request-URI, e.g. deleting an uploaded file.
HTTP: Hypertext Transfer Protocol II


  To write Web applications, we are interested in the most used
  communication primitives between the client(browser) and the
  Web server:
      GET: retrieve the information identified by the Request-URI.
      POST: providing a block of data to server, e.g. posting a
      message, filling a form, etc.
      PUT: request to store the enclosed entity under the
      Request-URI, e.g. uploading a file.
      DELETE: request to delete the resource identified by the
      Request-URI, e.g. deleting an uploaded file.
HTTP: Hypertext Transfer Protocol II


  To write Web applications, we are interested in the most used
  communication primitives between the client(browser) and the
  Web server:
      GET: retrieve the information identified by the Request-URI.
      POST: providing a block of data to server, e.g. posting a
      message, filling a form, etc.
      PUT: request to store the enclosed entity under the
      Request-URI, e.g. uploading a file.
      DELETE: request to delete the resource identified by the
      Request-URI, e.g. deleting an uploaded file.
HTTP: Hypertext Transfer Protocol II


  To write Web applications, we are interested in the most used
  communication primitives between the client(browser) and the
  Web server:
      GET: retrieve the information identified by the Request-URI.
      POST: providing a block of data to server, e.g. posting a
      message, filling a form, etc.
      PUT: request to store the enclosed entity under the
      Request-URI, e.g. uploading a file.
      DELETE: request to delete the resource identified by the
      Request-URI, e.g. deleting an uploaded file.
Common Gateway Interface (CGI) I




  CGI is a standard for interfacing external applications with
  information servers, such as HTTP or Web servers.
  Very important evolution: Static pages -> dynamic pages
  CGI programs can be written by using any programming languages
  with input/output, e.g. C, C++, Perl, Shell, Fortran, TCL ...
Common Gateway Interface (CGI) II



  But CGI has the following problems:
      Performance: each CGI program instance is a process of
      operation system, i.e. for each request from client, the OS
      create a process.
      Security: a Web application, as it is a normal application, can
      block or crash the server.
      Manageability: difficult to manage the set of CGI programs
      and connect them together.
Common Gateway Interface (CGI) II



  But CGI has the following problems:
      Performance: each CGI program instance is a process of
      operation system, i.e. for each request from client, the OS
      create a process.
      Security: a Web application, as it is a normal application, can
      block or crash the server.
      Manageability: difficult to manage the set of CGI programs
      and connect them together.
Common Gateway Interface (CGI) II



  But CGI has the following problems:
      Performance: each CGI program instance is a process of
      operation system, i.e. for each request from client, the OS
      create a process.
      Security: a Web application, as it is a normal application, can
      block or crash the server.
      Manageability: difficult to manage the set of CGI programs
      and connect them together.
Web Application Model


  Web Application Models are proposed for the separation of
  responsibilities between the Web server and Web application, and
  how to collaborate to get better performance.
      Easy to be managed, Web applications are homogeneous and
      securer.
      More efficient, e.g using thread pool to manage the
      application instances.
      Use the Inverse of Control principle.
      Examples: Apache modules (for php, perl etc.), Web
      application container (e.g. Tomcat).
      With the same approach: Application Server (AS), e.g.
      Enterprise JavaBean container.
Summary




    HTTP for : client / server communication
    CGI for : Web server / Application Integration
    JSP / Servlet : a model used for creating Java Web
    applications. Using the container model.
    We proceed with JSP/Servlet.
Summary




    HTTP for : client / server communication
    CGI for : Web server / Application Integration
    JSP / Servlet : a model used for creating Java Web
    applications. Using the container model.
    We proceed with JSP/Servlet.
Summary




    HTTP for : client / server communication
    CGI for : Web server / Application Integration
    JSP / Servlet : a model used for creating Java Web
    applications. Using the container model.
    We proceed with JSP/Servlet.
Summary




    HTTP for : client / server communication
    CGI for : Web server / Application Integration
    JSP / Servlet : a model used for creating Java Web
    applications. Using the container model.
    We proceed with JSP/Servlet.
Outline
  Introduction
      Overview
      WEB 1.0 vs WEB 2.0
  HTTP, CGI, Web Application Model
    HTTP
    Common Gateway Interface (CGI)
    Web Application Model
    Summary
  Servlet & JSP
     Servlet
     Java Server Pages
  AJAX
     Using AJAX
  Summary
  Resources
Java Web Application Model
                           Web Server
           Web Application Container

      Web Application      Web Application                request/response
          /app1                /app2
          servlet              servlet         request
                                               handling
          servlet              servlet

          servlet              servlet                          client




             Server side Service Invocation




        Server Side Apps           Database



                    Figure: Java Web Application Model
Java Web Application Model


  There are several levels of scope, where each one has its
  parameters:
      Container: system-wide configuration
      Application: application configuration and parameters
      Servlet: servlet information and parameters
      Page: information related with a JSP
      Session: session information can cross pages and servlets,
      session can be used to store objects
  Each level is modeled by a Java class or interface. (Implicit objects
  in JSP)
Interface javax.servlet.Servlet


   This interface defines methods to initialize a servlet, to service
   requests, and to remove a servlet from the server:
       The servlet is constructed, then initialized with the init
       method.
       Any calls from clients to the service method are handled.
       The servlet is taken out of service, then destroyed with the
       destroy method, then garbage collected and finalized.
   In addition to the life-cycle methods, this interface provides the
   getServletConfig method, which the servlet can use to get any
   startup information, and the getServletInfo method, which allows
   the servlet to return basic information about itself, such as author,
   version, and copyright.
Abstract Class javax.servlet.GenericServlet



   The abstract class GenericServlet defines a generic,
   protocol-independent servlet.
       It implements the Servlet and ServletConfig interface.
       It provides simple versions of the lifecycle methods init and
       destroy and of the methods in the ServletConfig interface.
       GenericServlet also implements the log method, declared in
       the ServletContext interface.
   To write a generic servlet, you need only override the abstract
   service method. HttpServlet is a subclass of GenericServlet using
   HTTP protocol.
Abstract class javax.servlet.http.HttpServlet

   The abstract class HttpServlet is designed to be subclassed to
   create an HTTP servlet suitable for a Web site. A subclass of
   HttpServlet must override at least one method, usually one of
   these:
       doGet, if the servlet supports HTTP GET requests
       doPost, for HTTP POST requests
       doPut, for HTTP PUT requests
       doDelete, for HTTP DELETE requests
       init and destroy, to manage resources that are held for the life
       of the servlet
       getServletInfo, which the servlet uses to provide information
       about itself
Abstract class javax.servlet.http.HttpServlet

   The abstract class HttpServlet is designed to be subclassed to
   create an HTTP servlet suitable for a Web site. A subclass of
   HttpServlet must override at least one method, usually one of
   these:
       doGet, if the servlet supports HTTP GET requests
       doPost, for HTTP POST requests
       doPut, for HTTP PUT requests
       doDelete, for HTTP DELETE requests
       init and destroy, to manage resources that are held for the life
       of the servlet
       getServletInfo, which the servlet uses to provide information
       about itself
Abstract class javax.servlet.http.HttpServlet

   The abstract class HttpServlet is designed to be subclassed to
   create an HTTP servlet suitable for a Web site. A subclass of
   HttpServlet must override at least one method, usually one of
   these:
       doGet, if the servlet supports HTTP GET requests
       doPost, for HTTP POST requests
       doPut, for HTTP PUT requests
       doDelete, for HTTP DELETE requests
       init and destroy, to manage resources that are held for the life
       of the servlet
       getServletInfo, which the servlet uses to provide information
       about itself
Abstract class javax.servlet.http.HttpServlet

   The abstract class HttpServlet is designed to be subclassed to
   create an HTTP servlet suitable for a Web site. A subclass of
   HttpServlet must override at least one method, usually one of
   these:
       doGet, if the servlet supports HTTP GET requests
       doPost, for HTTP POST requests
       doPut, for HTTP PUT requests
       doDelete, for HTTP DELETE requests
       init and destroy, to manage resources that are held for the life
       of the servlet
       getServletInfo, which the servlet uses to provide information
       about itself
Abstract class javax.servlet.http.HttpServlet

   The abstract class HttpServlet is designed to be subclassed to
   create an HTTP servlet suitable for a Web site. A subclass of
   HttpServlet must override at least one method, usually one of
   these:
       doGet, if the servlet supports HTTP GET requests
       doPost, for HTTP POST requests
       doPut, for HTTP PUT requests
       doDelete, for HTTP DELETE requests
       init and destroy, to manage resources that are held for the life
       of the servlet
       getServletInfo, which the servlet uses to provide information
       about itself
Abstract class javax.servlet.http.HttpServlet

   The abstract class HttpServlet is designed to be subclassed to
   create an HTTP servlet suitable for a Web site. A subclass of
   HttpServlet must override at least one method, usually one of
   these:
       doGet, if the servlet supports HTTP GET requests
       doPost, for HTTP POST requests
       doPut, for HTTP PUT requests
       doDelete, for HTTP DELETE requests
       init and destroy, to manage resources that are held for the life
       of the servlet
       getServletInfo, which the servlet uses to provide information
       about itself
Writing a HttpServlet

  A Servlet which returns ”Hello World” to the browser

  import java.io.*;
  import javax.servlet.*;
  import javax.servlet.http.*;

  public class HelloWorld extends HttpServlet {
    public void doGet(HttpServletRequest request,
                      HttpServletResponse response)
        throws ServletException, IOException {
      PrintWriter out = response.getWriter();
      out.println("Hello World");
    }
    public String getServletInfo() {
    return "Hello world example for PINFO";
    }
  }
Writing a HttpServlet II

   Return HTML content
   import java.io.*;
   import javax.servlet.*;
   import javax.servlet.http.*;

   public class HelloWorld extends HttpServlet {
     public void doGet(HttpServletRequest request,
                       HttpServletResponse response)
         throws ServletException, IOException {
       response.setContentType("text/html"); // set HTTP response content type
       PrintWriter out = response.getWriter();
       out.println("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
                                            "Transitional//EN\">\n" +
                   "<HTML>\n" +
                   "<HEAD><TITLE>Hello WWW</TITLE></HEAD>\n" +
                   "<BODY>\n" +
                   "<H1>Hello WWW</H1>\n" +
                   "</BODY></HTML>");
     }
     public String getServletInfo() {
     return "Hello world example for PINFO";
     }
   }
Get the value of the request parameter


  HttpServletRequest class
  Request URL: http://localhost:8080/list.jsp?category=pinfo05

  public void doGet(HttpServletRequest request,
       HttpServletResponse response) throws ... {
            ...
           String cat = request.getParameter("category");
           ...}

  cat will have value ”pinfo05”. It works for both GET and POST requests.

  Two important classes: HttpServletRequest contains information
  about the request; HttpServletResponse is used to generate HTTP
  response.
Java Server Pages


  Java Server Pages
  A way of creating dynamic pages with Java and HTML.
  Principle: Java for application logic, HTML for presentation.
  JSP uses HTML for page rendering, and provides several ways to
  use Java components:
      Scriptlet: Java codes enclosed by <% and %>
      Taglib: customized JSP tags
      Using JavaBeans
  JSP are translated into Java servlets before they are compiled by
  the Web application container. HttpServletRequest and
  HttpServletResponse are implicit objects in JSP.
Implicit Objects in Java Server Page

  The following variables can be directly used in JSP:
      page: jsp.HttpJspPage : Page’s servlet instance
      config: ServletConfig : Servlet configuration information
      pageContext: jsp.pageContext : Provides access to all the
      namespaces associated with a JSP page and access to several
      page attributes
      request: http.HttpServletRequest : Data included with the
      HTTP Request
      response: http.HttpServletResponse : HTTP Response data,
      e.g. cookies
      out: jsp.JspWriter : Output stream for page context
      session: http.HttpSession : User specific session data
      application: ServletContext : Data shared by all application
      pages
Implicit Objects in Java Server Page

  The following variables can be directly used in JSP:
      page: jsp.HttpJspPage : Page’s servlet instance
      config: ServletConfig : Servlet configuration information
      pageContext: jsp.pageContext : Provides access to all the
      namespaces associated with a JSP page and access to several
      page attributes
      request: http.HttpServletRequest : Data included with the
      HTTP Request
      response: http.HttpServletResponse : HTTP Response data,
      e.g. cookies
      out: jsp.JspWriter : Output stream for page context
      session: http.HttpSession : User specific session data
      application: ServletContext : Data shared by all application
      pages
Implicit Objects in Java Server Page

  The following variables can be directly used in JSP:
      page: jsp.HttpJspPage : Page’s servlet instance
      config: ServletConfig : Servlet configuration information
      pageContext: jsp.pageContext : Provides access to all the
      namespaces associated with a JSP page and access to several
      page attributes
      request: http.HttpServletRequest : Data included with the
      HTTP Request
      response: http.HttpServletResponse : HTTP Response data,
      e.g. cookies
      out: jsp.JspWriter : Output stream for page context
      session: http.HttpSession : User specific session data
      application: ServletContext : Data shared by all application
      pages
Implicit Objects in Java Server Page

  The following variables can be directly used in JSP:
      page: jsp.HttpJspPage : Page’s servlet instance
      config: ServletConfig : Servlet configuration information
      pageContext: jsp.pageContext : Provides access to all the
      namespaces associated with a JSP page and access to several
      page attributes
      request: http.HttpServletRequest : Data included with the
      HTTP Request
      response: http.HttpServletResponse : HTTP Response data,
      e.g. cookies
      out: jsp.JspWriter : Output stream for page context
      session: http.HttpSession : User specific session data
      application: ServletContext : Data shared by all application
      pages
Implicit Objects in Java Server Page

  The following variables can be directly used in JSP:
      page: jsp.HttpJspPage : Page’s servlet instance
      config: ServletConfig : Servlet configuration information
      pageContext: jsp.pageContext : Provides access to all the
      namespaces associated with a JSP page and access to several
      page attributes
      request: http.HttpServletRequest : Data included with the
      HTTP Request
      response: http.HttpServletResponse : HTTP Response data,
      e.g. cookies
      out: jsp.JspWriter : Output stream for page context
      session: http.HttpSession : User specific session data
      application: ServletContext : Data shared by all application
      pages
Implicit Objects in Java Server Page

  The following variables can be directly used in JSP:
      page: jsp.HttpJspPage : Page’s servlet instance
      config: ServletConfig : Servlet configuration information
      pageContext: jsp.pageContext : Provides access to all the
      namespaces associated with a JSP page and access to several
      page attributes
      request: http.HttpServletRequest : Data included with the
      HTTP Request
      response: http.HttpServletResponse : HTTP Response data,
      e.g. cookies
      out: jsp.JspWriter : Output stream for page context
      session: http.HttpSession : User specific session data
      application: ServletContext : Data shared by all application
      pages
Implicit Objects in Java Server Page

  The following variables can be directly used in JSP:
      page: jsp.HttpJspPage : Page’s servlet instance
      config: ServletConfig : Servlet configuration information
      pageContext: jsp.pageContext : Provides access to all the
      namespaces associated with a JSP page and access to several
      page attributes
      request: http.HttpServletRequest : Data included with the
      HTTP Request
      response: http.HttpServletResponse : HTTP Response data,
      e.g. cookies
      out: jsp.JspWriter : Output stream for page context
      session: http.HttpSession : User specific session data
      application: ServletContext : Data shared by all application
      pages
Implicit Objects in Java Server Page

  The following variables can be directly used in JSP:
      page: jsp.HttpJspPage : Page’s servlet instance
      config: ServletConfig : Servlet configuration information
      pageContext: jsp.pageContext : Provides access to all the
      namespaces associated with a JSP page and access to several
      page attributes
      request: http.HttpServletRequest : Data included with the
      HTTP Request
      response: http.HttpServletResponse : HTTP Response data,
      e.g. cookies
      out: jsp.JspWriter : Output stream for page context
      session: http.HttpSession : User specific session data
      application: ServletContext : Data shared by all application
      pages
Outline
  Introduction
      Overview
      WEB 1.0 vs WEB 2.0
  HTTP, CGI, Web Application Model
    HTTP
    Common Gateway Interface (CGI)
    Web Application Model
    Summary
  Servlet & JSP
     Servlet
     Java Server Pages
  AJAX
    Using AJAX
  Summary
  Resources
Asynchronous JavaScript And XML (AJAX)



  AJAX incorporates several technologies:
      standards-based presentation using XHTML and CSS;
      dynamic display and interaction using the Document Object
      Model;
      data interchange and manipulation using XML and XSLT;
      asynchronous data retrieval using XMLHttpRequest;
      and JavaScript binding everything together.
  www.w3schools.com provides tutorials for XHTML, CSS, DOM,
  XML, AJAX, JavaScript etc.
Asynchronous JavaScript And XML (AJAX)



  AJAX incorporates several technologies:
      standards-based presentation using XHTML and CSS;
      dynamic display and interaction using the Document Object
      Model;
      data interchange and manipulation using XML and XSLT;
      asynchronous data retrieval using XMLHttpRequest;
      and JavaScript binding everything together.
  www.w3schools.com provides tutorials for XHTML, CSS, DOM,
  XML, AJAX, JavaScript etc.
Asynchronous JavaScript And XML (AJAX)



  AJAX incorporates several technologies:
      standards-based presentation using XHTML and CSS;
      dynamic display and interaction using the Document Object
      Model;
      data interchange and manipulation using XML and XSLT;
      asynchronous data retrieval using XMLHttpRequest;
      and JavaScript binding everything together.
  www.w3schools.com provides tutorials for XHTML, CSS, DOM,
  XML, AJAX, JavaScript etc.
Asynchronous JavaScript And XML (AJAX)



  AJAX incorporates several technologies:
      standards-based presentation using XHTML and CSS;
      dynamic display and interaction using the Document Object
      Model;
      data interchange and manipulation using XML and XSLT;
      asynchronous data retrieval using XMLHttpRequest;
      and JavaScript binding everything together.
  www.w3schools.com provides tutorials for XHTML, CSS, DOM,
  XML, AJAX, JavaScript etc.
Asynchronous JavaScript And XML (AJAX)



  AJAX incorporates several technologies:
      standards-based presentation using XHTML and CSS;
      dynamic display and interaction using the Document Object
      Model;
      data interchange and manipulation using XML and XSLT;
      asynchronous data retrieval using XMLHttpRequest;
      and JavaScript binding everything together.
  www.w3schools.com provides tutorials for XHTML, CSS, DOM,
  XML, AJAX, JavaScript etc.
AJAX: Connect HTML with JavaScript


  Capture Events on HTML pages
      Mouse event (with elements): mouse down, mouse up, mouse
      move, mouse over ...
      Keyboard event: key pressed ...
      Form: submitted ...
      Timer etc.
  Example: Call the getListByCategory function when the mouse is
  moved over the hyper linked text, and call the function cleanTable
  when the moused is moved out the link.
  <a href="/" onmouseover="getListByCategory()"
  onmouseout="clearTable()">Show Member List</a>
AJAX: Create XMLHttpRequest Object
  This function will create an XMLHttpRequest object and send a GET
  request to the server page http://pinfo.unige.ch:8080/Member/list.jsp
  with parameter category with value pinfo05.
  Send a HTTP request via XMLHttpRequest Object:

    function getListByCategory() {
        var req = false;
        var self = this;

        var url = "http://pinfo.unige.ch:8080/Member/list.jsp?category=pinfo05";

        if (window.XMLHttpRequest) {
            self.req = new XMLHttpRequest(); // for Firefox and other browsers
        } else if (window.ActiveXObject) {
            self.req = new ActiveXObject("Microsoft.XMLHTTP"); // for IE browser
        }
        // when the request is finished, call this function
        self.req.onreadystatechange = processRequest;
        self.req.open("GET", url, true); // it is a GET request
        self.req.send(null); // send the request
    }



  Note that the implementation of XMLHttpRequest is different from one
  browser to another.
AJAX: Handling Asynchronous Response

  A node is tagged with id ”result” in the HTML document

  <div id=result></div>

  The function processRequest is called when the XMLHttpRequest
  is finished (asynchronous response).

    function processRequest() {
      // check the request state is "complete"
         if (req.readyState == 4 || req.readyState == "complete") {
             if (req.status == 200) {
               updatepage(self.req.responseText);
             } else {
                  alert("Not able to retrieve member list");
             }
         }
    }
    // Just set the content of note with id "result" with the input parameter
    // Other DOM and XML operations are possible, here it is simplified.
    function updatepage(str) {
         document.getElementById("result").innerHTML = str;
    }
AJAX: Web Application Model




            Figure: AJAX Web Application Model
AJAX: Interactions




                Figure: AJAX Interactions
Outline
  Introduction
      Overview
      WEB 1.0 vs WEB 2.0
  HTTP, CGI, Web Application Model
    HTTP
    Common Gateway Interface (CGI)
    Web Application Model
    Summary
  Servlet & JSP
     Servlet
     Java Server Pages
  AJAX
     Using AJAX
  Summary
  Resources
Summary


    Web Application Model: relations between client, Web server,
    server side application, and web application. The Application
    Container model is mature.
    JSP and Servlets provide server side programming facilities:
    reusability, manageability, security etc.
    AJAX provides a standard solution for client/server
    interaction: XML based, Asynchronous, no page refresh
    needed. It is the most used technology in WEB 2.0.
    AJAX is the complement for the presentation layer of Web
    applications with JSP: JSP provides services, AJAX use these
    services, messages are in XML, communication via HTTP.
    WEB 2.0 is more than AJAX.
Summary


    Web Application Model: relations between client, Web server,
    server side application, and web application. The Application
    Container model is mature.
    JSP and Servlets provide server side programming facilities:
    reusability, manageability, security etc.
    AJAX provides a standard solution for client/server
    interaction: XML based, Asynchronous, no page refresh
    needed. It is the most used technology in WEB 2.0.
    AJAX is the complement for the presentation layer of Web
    applications with JSP: JSP provides services, AJAX use these
    services, messages are in XML, communication via HTTP.
    WEB 2.0 is more than AJAX.
Summary


    Web Application Model: relations between client, Web server,
    server side application, and web application. The Application
    Container model is mature.
    JSP and Servlets provide server side programming facilities:
    reusability, manageability, security etc.
    AJAX provides a standard solution for client/server
    interaction: XML based, Asynchronous, no page refresh
    needed. It is the most used technology in WEB 2.0.
    AJAX is the complement for the presentation layer of Web
    applications with JSP: JSP provides services, AJAX use these
    services, messages are in XML, communication via HTTP.
    WEB 2.0 is more than AJAX.
Summary


    Web Application Model: relations between client, Web server,
    server side application, and web application. The Application
    Container model is mature.
    JSP and Servlets provide server side programming facilities:
    reusability, manageability, security etc.
    AJAX provides a standard solution for client/server
    interaction: XML based, Asynchronous, no page refresh
    needed. It is the most used technology in WEB 2.0.
    AJAX is the complement for the presentation layer of Web
    applications with JSP: JSP provides services, AJAX use these
    services, messages are in XML, communication via HTTP.
    WEB 2.0 is more than AJAX.
Summary


    Web Application Model: relations between client, Web server,
    server side application, and web application. The Application
    Container model is mature.
    JSP and Servlets provide server side programming facilities:
    reusability, manageability, security etc.
    AJAX provides a standard solution for client/server
    interaction: XML based, Asynchronous, no page refresh
    needed. It is the most used technology in WEB 2.0.
    AJAX is the complement for the presentation layer of Web
    applications with JSP: JSP provides services, AJAX use these
    services, messages are in XML, communication via HTTP.
    WEB 2.0 is more than AJAX.
Summary


    Web Application Model: relations between client, Web server,
    server side application, and web application. The Application
    Container model is mature.
    JSP and Servlets provide server side programming facilities:
    reusability, manageability, security etc.
    AJAX provides a standard solution for client/server
    interaction: XML based, Asynchronous, no page refresh
    needed. It is the most used technology in WEB 2.0.
    AJAX is the complement for the presentation layer of Web
    applications with JSP: JSP provides services, AJAX use these
    services, messages are in XML, communication via HTTP.
    WEB 2.0 is more than AJAX.
Outline
  Introduction
      Overview
      WEB 1.0 vs WEB 2.0
  HTTP, CGI, Web Application Model
    HTTP
    Common Gateway Interface (CGI)
    Web Application Model
    Summary
  Servlet & JSP
     Servlet
     Java Server Pages
  AJAX
     Using AJAX
  Summary
  Resources
Servlet, JSP



  Specifications:
       Java Servlet Specifications
       JSP Technology
  Tutorial:
       Basic Servlets:
       http://www.apl.jhu.edu/ hall/java/Servlet-Tutorial/
       MoreServlets Book & Tutorials: Servlet, JSP, Taglib, Struts,
       AJAX
AJAX, WEB 2.0

  AJAX:
     Ajax: A New Approach to Web Applications
     AJAX: Getting Started, mozilla developer center
     Top 10 Ajax Applications
     AJAX Tutorial
     AJAX Login System Demo
     Guide to Using AJAX and XMLHttpRequest
     Ajaxian
  WEB 2.0
     O’Reilly: What Is Web 2.0
     The Best Web 2.0 Software of 2005
     Writly
     Google Earth

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:135
posted:9/23/2010
language:English
pages:67