TR NG Đ I H C NÔNG LÂM TP.HCM KHOA CÔNG NGH THÔNG TIN ƯỜ Ạ Ọ Ệ

H N I V N Â U X N Ễ Y U G N

:

V G

WEB APPLICATIONS

2 G N Ạ M H N Ì R T P Ậ L :

N Ô M

4 1

/

/

0 1 7 2

X X

/

1

Presenter: Nguy n Xuân Vinh Information Technology Faculty Nong Lam University

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

H N I V N Â U X N Ễ Y U G N

:

server. Web applications are of the following types:  Presentation-oriented: generates interactive web pages

V G

containing various types of markup language.

 Service-oriented: implements the endpoint of a web service.

2 G N Ạ M H N Ì R T P Ậ L :

N Ô M

4 1

/

/

0 1 7 2

X X

/

2

TR NG Đ I H C NÔNG LÂM TP.HCM KHOA CÔNG NGH THÔNG TIN ƯỜ Ạ Ọ Ệ

Web Applications

 Web components can be:

H N I V N Â U X N Ễ Y U G N

:

V G

 Java Servlets.  Web pages implemented with JavaServer Faces technology.  Web service endpoints.  JSP pages.

2 G N Ạ M H N Ì R T P Ậ L :

N Ô M

4 1

/

/

0 1 7 2

X X

/

Figure - Java Web Application Technologies

3

TR NG Đ I H C NÔNG LÂM TP.HCM KHOA CÔNG NGH THÔNG TIN ƯỜ Ạ Ọ Ệ

Web Applications

H N I V N Â U X N Ễ Y U G N

:

V G

Servlets are best suited for service-oriented applications

 JavaWebApplication Request Handling Servlets are Java programming language classes that dynamically process requests and construct responses.

2 G N Ạ M H N Ì R T P Ậ L :

N Ô M

4 1

/

/

0 1 7 2

X X

/

4

Java Server Faces and Facelets pages aremore appropriate for generating text- basedmarkup

JavaServer Faces and Facelets, are used for building interactive web applications

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.

H N I V N Â U X N Ễ Y U G N

:

 Web container provides such services as:

V G

 Request dispatching.  Security.  Concurrency.  Lifecycle management.

2 G N Ạ M H N Ì R T P Ậ L :

 Web container gives web components access to such API as:

N Ô M

4 1

/

/

 Naming.  Transactions.  Email.

0 1 7 2

X X

/

5

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

H N I V N Â U X N Ễ Y U G N

:

V G

 Java EE annotations  Web application deployment descriptor (DD): XML file.

2 G N Ạ M H N Ì R T P Ậ L :

N Ô M

4 1

/

/

0 1 7 2

X X

/

6

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:

H N I V N Â U X N Ễ Y U G N

:

V G

Develop the web component code

1

Develop the web application deployment descriptor (if necessary)

2

3

Compile web application components, helper classes referenced by components Optionally, package the application into a deployable unit

4

2 G N Ạ M H N Ì R T P Ậ L :

N Ô M

Deploy the application into a web container

5

Access a URL that references the web application

4 1

6

/

/

0 1 7 2

X X

/

7

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

H N I V N Â U X N Ễ Y U G N

:

resources.

V G

 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.

2 G N Ạ M H N Ì R T P Ậ L :

N Ô M

4 1

/

/

0 1 7 2

X X

/

8

TR NG Đ I H C NÔNG LÂM TP.HCM KHOA CÔNG NGH THÔNG TIN ƯỜ Ạ Ọ Ệ

Web Module 1: hello example

H N I V N Â U X N Ễ Y U G N

:

V G

2 G N Ạ M H N Ì R T P Ậ L :

N Ô M

4 1

/

/

0 1 7 2

X X

/

9

TR NG Đ I H C NÔNG LÂM TP.HCM KHOA CÔNG NGH THÔNG TIN ƯỜ Ạ Ọ Ệ

Web Module 1: Demo

H N I V N Â U X N Ễ Y U G N

:

V G

 Create Web Project and depoly by Eclipse, Netbean  Create Web Project and deploy by Ant  Create Web Project and deploy by Maven

2 G N Ạ M H N Ì R T P Ậ L :

N Ô M

4 1

/

/

0 1 7 2

X X

/

0 1

TR NG Đ I H C NÔNG LÂM TP.HCM KHOA CÔNG NGH THÔNG TIN ƯỜ Ạ Ọ Ệ

H I ĐÁP

H N I V N Â U X N Ễ Y U G N

:

V G

2 G N Ạ M H N Ì R T P Ậ L :

N Ô M

4 1

/

/

0 1 7 2

X X

/

1 1