Thư viện tri thức trực tuyến
Kho tài liệu với 50,000+ tài liệu học thuật
© 2023 Siêu thị PDF - Kho tài liệu học thuật hàng đầu Việt Nam

Web Programming with Java pptx
Nội dung xem thử
Mô tả chi tiết
1
Web Programming with Java
Servlets
Huynh Huu Viet
University of Information Technology
Departmen
t of Information Sys
te
m
s
Email: [email protected]
2008 © Department of Information Systems - University of Information Technology 2
Outline
Introduction
Overview of Servlet technology
Servlet basics
The Servlet Lifecycle
Retrieving and Sending HTML
Servlet Sessions
2008 © Department of Information Systems - University of Information Technology 3
Introduction
Java networking capabilities:
Socket-based and packet-based
communications
• Package java.net
Remote Method Invocation (RMI)
• Package java.rmi
Servlets and JavaServer Pages (JSP)
• Request-response model
• Packages javax.servlet
– javax.servlet.http
– javax.servlet.jsp
the Web tier of J2EE
2008 © Department of Information Systems - University of Information Technology 4
Introduction (cont.)
Servlets
Thin clients
Request/response mechanism
Session-tracking capabilities
redirection/forwarding control
Servlets: small Java programs that
run on a web server
Just as applets run on browser
Provide web-based applications
Extends functionality of web server
2008 © Department of Information Systems - University of Information Technology 5
Outline
Introduction
Overview of Servlet technology
Servlet basics
The Servlet Lifecycle
Retrieving and Sending HTML
Servlet Sessions
2008 © Department of Information Systems - University of Information Technology 6
A Servlet's Job
Read explicit data sent by client (form
data)
Read implicit data sent by client (request
headers)
Generate the results
Send the explicit data back to client
(HTML or binary)
Send the implicit data back to client
(status codes and response headers)