Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Jsp & Ajax
1. HTTP, JSP, and AJAX
Ang Chen
CUI, University of Geneva
PINFO 05-06 May 8, 2006
2. 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
3. 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
4. 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.
5. 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.
6. 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.
7. 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
8. 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.
9. 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.
10. 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.
11. 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.
12. 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.
13. 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.
14. 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.
15. 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 ...
16. 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.
17. 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.
18. 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.
19. 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.
20. 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.
21. 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.
22. 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.
23. 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.
24. 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
25. Java Web Application Model
Web Server
Web Application Container
request/response
Web Application Web Application
/app1 /app2
servlet servlet request
handling
servlet servlet
client
servlet servlet
Server side Service Invocation
Server Side Apps Database
Figure: Java Web Application Model
26. 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)
27. 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.
28. 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.
29. 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
30. 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
31. 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
32. 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
33. 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
34. 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
35. 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(quot;Hello Worldquot;);
}
public String getServletInfo() {
return quot;Hello world example for PINFOquot;;
}
}
36. 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(quot;text/htmlquot;); // set HTTP response content type
PrintWriter out = response.getWriter();
out.println(quot;<!DOCTYPE HTML PUBLIC quot;-//W3C//DTD HTML 4.0 quot; +
quot;Transitional//ENquot;>nquot; +
quot;<HTML>nquot; +
quot;<HEAD><TITLE>Hello WWW</TITLE></HEAD>nquot; +
quot;<BODY>nquot; +
quot;<H1>Hello WWW</H1>nquot; +
quot;</BODY></HTML>quot;);
}
public String getServletInfo() {
return quot;Hello world example for PINFOquot;;
}
}
37. 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(quot;categoryquot;);
...}
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.
38. 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.
39. 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
40. 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
41. 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
42. 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
43. 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
44. 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
45. 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
46. 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
47. 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
48. 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.
49. 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.
50. 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.
51. 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.
52. 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.
53. 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=quot;/quot; onmouseover=quot;getListByCategory()quot;
onmouseout=quot;clearTable()quot;>Show Member List</a>
54. 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 = quot;http://pinfo.unige.ch:8080/Member/list.jsp?category=pinfo05quot;;
if (window.XMLHttpRequest) {
self.req = new XMLHttpRequest(); // for Firefox and other browsers
} else if (window.ActiveXObject) {
self.req = new ActiveXObject(quot;Microsoft.XMLHTTPquot;); // for IE browser
}
// when the request is finished, call this function
self.req.onreadystatechange = processRequest;
self.req.open(quot;GETquot;, 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.
55. 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 quot;completequot;
if (req.readyState == 4 || req.readyState == quot;completequot;) {
if (req.status == 200) {
updatepage(self.req.responseText);
} else {
alert(quot;Not able to retrieve member listquot;);
}
}
}
// Just set the content of note with id quot;resultquot; with the input parameter
// Other DOM and XML operations are possible, here it is simplified.
function updatepage(str) {
document.getElementById(quot;resultquot;).innerHTML = str;
}
58. 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
59. 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.
60. 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.
61. 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.
62. 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.
63. 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.
64. 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.
65. 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
67. 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