TAILIEUCHUNG - Mastering Jakarta Struts phần 8

Trong các phần tiếp theo, chúng tôi kiểm tra các thành phần này và làm thế nào họ có thể được thừa hưởng. Tại thời điểm này, bạn cần phải có một sự hiểu biết khá tốt về những gì JSP và làm thế nào họ có thể được sử dụng. Bây giờ chúng ta có thể | Adding Global Forwards The action subelement is used to describe an Action instance to the ActionServlet. It represents the information that uniquely defines an instance of a particular action class. The syntax of the action-mappings subelement including a sample action subelement is shown here action-mappings action path context-relative path mapping action to a request type fully qualified class name of the Action class name the name of the form bean bound to this Action forward name forwardname1 path context-relative path forward name forwardname2 path context-relative path action action-mappings Note You will notice that the action element above contains two forward subelements. These subelements are defined in exactly the same way as the forward elements nested inside a global-forwards element except that they are local to the defined action subelement. These forward subelements can be referenced only by their parent action . Table describes the attributes of an action subelement. Table The Attributes of an action Subelement Attribute Description path Represents the context-relative path of the submitted request. The path must start with a character. Required type Gives the fully qualified class name of the Action class being described by this ActionMapping. The type attribute is valid only if no include or forward attribute is specified. Optional name Identifies the name of the form bean if any that is coupled with the Action being defined. Optional scope Specifies the scope of the form bean that is bound to the described Action. The default value is session. Optional input Gives the context-relative path of the input form to which control should be returned if a validation error is encountered. The input attribute is where control will be returned if ActionErrors are returned from the ActionForm or Action objects. Optional className Specifies the fully qualified class name of the ActionMapping implementation class to use when invoking this Action .

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.