KHOA CÔNG NGHỆ THÔNG TIN
1
/XX
05/12/15
MÔN: LẬP TRÌNH MẠNG 2
GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM
WEB APPLICATIONS
Presenter: Nguyễn Xuân Vinh
Information Technology Faculty
Nong Lam University
2
/XX
05/12/15
MÔN: LẬP TRÌNH MẠNG 2
GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM
KHOA CÔNG NGHỆ THÔNG TIN
Overview
Web application is a dynamic extension of a web or application
server. Web applications are of the following types:
Presentation-oriented: generates interactive web pages
containing various types of markup language.
Service-oriented: implements the endpoint of a web service.
/XX
3
KHOA CÔNG NGHỆ THÔNG TIN
Web Applications
Web components can be:
Java Servlets.
Web pages implemented with JavaServer Faces technology.
Web service endpoints.
JSP pages.
05/12/15
MÔN: LẬP TRÌNH MẠNG 2
GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM
Figure - Java Web Application Technologies
4
/XX
05/12/15
MÔN: LẬP TRÌNH MẠNG 2
GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM
KHOA CÔNG NGHỆ THÔNG TIN
Web Applications
JavaWebApplication Request Handling
Servlets are Java
programming language
classes that dynamically
process requests and
construct responses.
Servlets are best suited for
service-oriented
applications
JavaServer Faces and
Facelets, are used for
building interactive web
applications
Java Server Faces and
Facelets pages aremore
appropriate for generating
text-basedmarkup
5
/XX
05/12/15
MÔN: LẬP TRÌNH MẠNG 2
GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM
KHOA CÔNG NGHỆ THÔNG TIN
Web Applications
Web components are supported by the services of a runtime
platform called a web container.
Web container provides such services as:
Request dispatching.
Security.
Concurrency.
Lifecycle management.
Web container gives web components access to such API as:
Naming.
Transactions.
Email.
6
/XX
05/12/15
MÔN: LẬP TRÌNH MẠNG 2
GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM
KHOA CÔNG NGHỆ THÔNG TIN
Web Applications
The configuration information can be specified using
Java EE annotations
Web application deployment descriptor (DD): XML file.
7
/XX
05/12/15
MÔN: LẬP TRÌNH MẠNG 2
GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM
KHOA CÔNG NGHỆ THÔNG TIN
Web Application Lifecycle
The process for creating, deploying, and executing a web
application can be summarized as follows:
1
Develop the web component code
2
Develop the web application deployment descriptor (if necessary)
3
Compile web application components, helper classes referenced by components
4
Optionally, package the application into a deployable unit
5
Deploy the application into a web container
6
Access a URL that references the web application
8
/XX
05/12/15
MÔN: LẬP TRÌNH MẠNG 2
GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM
KHOA CÔNG NGHỆ THÔNG TIN
Web Module 1: hello example
Web resources: web components and static web content files.
A web module is the smallest deployable and usable unit of web
resources.
In addition to web components and web resources, a web module
can contain other files:
Server-side utility classes, such as shopping carts.
Client-side classes, such as applets and utility classes.
9
/XX
05/12/15
MÔN: LẬP TRÌNH MẠNG 2
GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM
Web Module 1: hello example
KHOA CÔNG NGHỆ THÔNG TIN
10
/XX
05/12/15
MÔN: LẬP TRÌNH MẠNG 2
GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM
KHOA CÔNG NGHỆ THÔNG TIN
Web Module 1: Demo
Create Web Project and depoly by Eclipse, Netbean
Create Web Project and deploy by Ant
Create Web Project and deploy by Maven
11
/XX
05/12/15
MÔN: LẬP TRÌNH MẠNG 2
GV: NGUYỄN XUÂN VINH
TRƯỜNG ĐẠI HỌC NÔNG LÂM TP.HCM
HỎI ĐÁP
KHOA CÔNG NGHỆ THÔNG TIN