TAILIEUCHUNG - Mastering Jakarta Struts phần 6

Trong chương này, chúng tôi kiểm tra các thành phần View của khung Struts. Một số trong những chủ đề mà chúng tôi thảo luận được sử dụng các thẻ từ các thư viện thẻ Struts, sử dụng ActionForms, và triển khai lần xem một ứng dụng Struts. Mục tiêu của chương này là cung cấp cho bạn một sự hiểu biết của View Struts | Chapter 11 Developing a Complete Struts Application http dtd web-app servlet servlet-name action servlet-name servlet-class servlet-class init-param param-name debug param-name param-value 5 param-value init-param init-param param-name config param-name param-value WEB-INF param-value init-param load-on-startup 1 load-on-startup servlet servlet-mapping servlet-name action servlet-name url-pattern .do url-pattern servlet-mapping taglib taglib-uri WEB-INF taglib-uri taglib-location WEB-INF taglib-location taglib taglib taglib-uri WEB-INF taglib-uri taglib-location WEB-INF taglib-location taglib taglib taglib-uri WEB-INF taglib-uri taglib-location WEB-INF taglib-location taglib web-app 10. Add any custom ActionMappings to the application. Again this step is optional it s only necessary when your application defines a custom ActionMapping. In this application we ve added a custom ActionMapping that will be associated with the Action class the custom mapping will specify whether the user must be logged in to perform the Action that it applies to. The default value is false which allows a user who is not logged in to execute the Action. Our custom ActionMapping is shown in Listing . Listing . package import 129 Chapter 11 Developing a Complete Struts Application public class EmployeesActionMapping extends ActionMapping protected boolean loginRequired false public EmployeesActionMapping super public void setLoginRequired boolean loginRequired loginRequired public boolean isLoginRequired return loginRequired To add this ActionMapping to the employees application you need to compile this class move it to the CAZTZ7AT_HƠME webapps employees WEB-INF classes com wiley directory and .

TỪ KHÓA LIÊN QUAN
Đã 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.