tailieunhanh - Bài giảng Lập trình mạng: Web Applications - GV. Nguyễn Xuân Vinh

Objectives: understand enterprise application, know some type of architectural models, understand web service architecture, determine service - oriented architecture, understand and use some web service technologies, build a simple web service. | WEB APPLICATIONS Presenter: Nguyễn Xuân Vinh Information Technology Faculty Nong Lam University 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. Web Applications Web components can be: Java Servlets. Web pages implemented with JavaServer Faces technology. Web service endpoints. JSP pages. Figure - Java Web Application Technologies Web Applications JavaWebApplication Request Handling Servlets are Java programming language classes that dynamically process requests and construct responses. JavaServer Faces and Facelets, are used for building interactive web applications Servlets are best suited for service-oriented applications Java Server Faces and Facelets pages aremore appropriate for generating text-basedmarkup 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. Web Applications The configuration information can be specified using Java EE annotations Web application deployment descriptor (DD): XML file. Web Application Lifecycle The process for creating, deploying, and executing a web application can be summarized as follows: Develop the web component code 1 Develop the web application deployment descriptor (if necessary) 2 Compile web application components, helper classes referenced by components 3 Optionally, package the application into a deployable unit 4 Deploy the application into a web container 5 Access a URL that references the web application 6 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. Web Module 1: hello example The document root contains a subdirectory named WEB-INF, which can contain the following iles and directories: ■ classes: A directory that contains server-side classes: servlets, enterprise bean class files, utility classes, and JavaBeans components ■ tags: A directory that contains tag files, which are implementations of tag libraries ■ lib: A directory that contains JAR iles that contain enterprise beans, and JAR archives of libraries called by server-side classes ■ Deployment descriptors, such as (the web application deployment descriptor) and (an EJB deployment descriptor) A web module needs a file if it uses JavaServer Faces technology, if it must specify certain kinds of security information, or if you want to override information specified by web component annotations. 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 HỎI ĐÁP

TỪ KHÓA LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.