TAILIEUCHUNG - Designing Enterprise Applicationswith the J2EETM Platform, Second Edition phần 4

Các ứng dụng viết cho nền tảng J2EE sẽ chạy trên bất kỳ máy chủ tương thích J2EE. Các nền tảng J2EE cung cấp một số lợi ích cho các tổ chức phát triển các ứng dụng, bao gồm cả một mô hình phát triển đơn giản hóa, công nghiệp-sức mạnh khả năng mở rộng, hỗ trợ cho các hệ thống thông tin hiện có, | WEB-TIER APPLICATION FRAMEWORK DESIGN 111 For example Figure shows the layout of a single page created by a template. Across the top of the page is a banner on the left is a navigation menu a footer appears at the bottom and the body content occupies the remaining space. Figure A Template Composes Other Views into a Consistent Layout Using templates in an application design centralizes control of the overall layout of pages in the application easing maintenance. Changing the layout in the template file changes the page layout for the entire application. More importantly the individual subviews like the Navigation Menu in Figure are used by reference in the template instead of by copy-and-paste. Therefore changing a subview means changing a single source file instead of changing all the files in which that subview occurs. Template implementation is most easily explained by example. In the sample application a JSP page called a template file specifies the page layout. The template file is a standard JSP page that uses custom tags to include subviews into each area of the page. The template references the individual subviews by name. Code Example is an example from the sample application that produces the layout shown in Figure . This file called is a JSP page that produces HTML. The file specifies the page layout as standard HTML tags and 112 CHAPTER 4 THE WEB TIER includes the content of other JSP pages using the custom tag insert shown underlined in the code example. @ taglib uri WEB-INF tlds prefix template html head title template insert parameter title title head body bgcolor FFFFFF table width 100 border 0 cellpadding 5 cellspacing 0 tr td colspan 2 template insert parameter banner td tr tr td width 20 valign top template insert parameter sidebar td . and so on . -- Code Example The Template JSP Page for the Layout Shown in Figure The JSP page includes the page named by the insert tag s parameter attribute at

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.