freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

計算機相關(guān)外文翻譯-其他專業(yè)-wenkub.com

2025-01-15 02:18 本頁面
   

【正文】 Distributed。您可以從 Sun 的網(wǎng)站獲得新的 JSP 和 Servlet 規(guī)范的草案。歡迎訪問本網(wǎng)站。我建議您在遇到問題時訪問 Struts 用戶郵件列表的歸檔資料。 ? 有限的適用范圍 Struts 是一種基于 Web 的 MVC 解決方案,所以必須用 HTML、 JSP 文件和 servlet 來實現(xiàn)它。我會聽到這樣的話, ―既然我可以用 VBScript 直接編寫 COM 對象,為什么還要等 COM 開發(fā)人員來創(chuàng)建它呢? ‖通過使用標(biāo)記庫, Struts 有助于限制 JSP 文件中所需的 Java 代碼的數(shù)量。最重要的是,如果讓網(wǎng)頁設(shè)計人員使用一點 Java,他將使用大量的 Java。由于 Struts 中的變化,我不得不數(shù)次修改我的示例,但我不保證我的示例 能與您下載的 Struts 協(xié)同工作。 ? 仍在變化中 這個框架仍在快速變化。當(dāng)然,這是一把雙刃劍。 ? 開放源碼 您可以獲得開放源碼的全部優(yōu)點,比如可以查看代碼并讓使用庫的每個人檢查代碼。 1) Struts 的優(yōu)點 ? JSP 標(biāo)記機制的使用 標(biāo)記特性從 JSP 文件獲得可重用代碼和抽象 Java 代碼。(您可能尚未注意到這一點,以 s 結(jié)尾的類就是容器) ActionMapping 包含有關(guān)特定事件如何映射到特定 Action 的信息。 圖 4 Command (ActionServlet) 與 Model (Action) 之間的關(guān)系的 UML 圖 ( 6) ActionMapping 類 輸入事件通常是在 HTTP 請求表單中發(fā)生的, servlet 容器將 HTTP 請求轉(zhuǎn)換為 HttpServletRequest 。) ( 5) Error 類 UML 圖(圖 6)還包括 ActionError 和 ActionErrors 。通過擴展 Action ,我們使得我們的業(yè)務(wù)接口與 Struts 業(yè)務(wù)接口保持兼容。 Adapter 使類能夠協(xié)同工作,如果沒有 Adapter,則這些類會因為不兼容的接口而無法協(xié)同工作。 Action 類應(yīng)該控制應(yīng)用程序的流程,而不 應(yīng)該控制應(yīng)用程序的邏輯。 ActionServlet (Command) 使用 perform() 方法將參數(shù)化的類傳遞給 ActionForm 。 ? UserActionForm 可跨多頁進行映射,以執(zhí)行諸如向?qū)е惖牟僮?。? UserAction 類中進行狀態(tài)驗證可能更好。 ? Struts 框架在將 UserActionForm 傳遞給業(yè)務(wù)包裝 UserAction 之前將更新它的狀態(tài)。 Struts 框架將執(zhí)行以下操作: ? 檢查 UserActionForm 是否存在;如果不存在,它將創(chuàng)建該類的一個實例。 ( 2) ActionForm 類 ActionForm 維護 Web 應(yīng)用程序的會話狀態(tài)。這使得人們更容易查看和理解它,尤其是對于大型應(yīng)用程序而言。如前所述, 文件配置該 Command。正如您所料 控制器使用配置文件以使您不必對這些值進行硬編碼。如果您對此比較熟悉,您會將配置信息放入一個文件,并在運行時加載這個文件。標(biāo)記是使 Struts 有別于其他框架(如 Velocity)的因素之一。 ActionForm bean 在會話級或請求級表示模型的狀態(tài),而不是在 持久級。 ? 業(yè)務(wù)邏輯 業(yè)務(wù)邏輯更新模型的狀態(tài),并幫助控制應(yīng)用程序的流程。 Web 容器將用一個 HTTP 響應(yīng)作出響應(yīng)。 圖 1. MVC Model 2 Struts, MVC 2 的一 種實現(xiàn) 4 Struts 概覽 Struts 是一組相互協(xié)作的類、 servlet 和 JSP 標(biāo)記,它們組成一個可重用的 MVC 2 設(shè)計。 ? 網(wǎng)頁設(shè)計人員不能直接參與網(wǎng)頁開發(fā)。當(dāng)然,我們可以使用 Java(或者 PERL、 C/C++ 或別的語言)代碼生成 HTML。 3 MVC Model 2 Web 向軟件開發(fā)人員提出了一些特有的挑戰(zhàn),最明顯的就是客戶機和服務(wù)器的無狀態(tài)連接。此外,它對控制器一無所知。它對視圖或控制器一無所知。這正是 MVC 發(fā)揮作用的地方。 Struts 是一種 MVC 實現(xiàn),它將 Servlet 和 JSP 標(biāo)記(屬于 J2EE 規(guī)范)用作實現(xiàn)的一部分。 JavaServer Pages (JSP) 技術(shù)為網(wǎng)頁設(shè)計人員和 Java 開發(fā)人員提供了一種聯(lián)系鈕帶。 關(guān)鍵字: Struts; MVC; JSP 1 簡介 學(xué)生也可以在因特網(wǎng)上發(fā)布 HTML 網(wǎng)頁。 if not, it will create an instance of the class. ? Struts will set the state of the UserActionForm using corresponding fields from the HttpServletRequest. No more dreadful () calls. For instance, the Struts framework will take fname from request stream and call (). ? The Struts framework updates the state of the UserActionForm before passing it to the business wrapper UserAction. ? Before passing it to the Action class, Struts will also conduct form state validation by calling the validation() method on UserActionForm. Note: This is not always wise to do. There might be ways of using UserActionForm in other pages or business objects, where the validation might be different. Validation of the state might be better in the UserAction class. ? The UserActionForm can be maintained at a session level. Notes: ? The file controls which HTML form request maps to which ActionForm. ? Multiple requests can be mapped UserActionForm. ? UserActionForm can be mapped over multiple pages for things such as wizards. ( 3) The Action class The Action class is a wrapper around the business logic. The purpose of Action class is to translate the HttpServletRequest to the business logic. To use Action, subclass and overwrite the process() method. The ActionServlet (Command) passes the parameterized classes to ActionForm using the perform() method. Again, no more dreadful () calls. By the time the event gets here, the input form data (or HTML form data) has already been translated out of the request stream and into an ActionForm class. Another way of thinking about Action class is as the Adapter design pattern. The purpose of the Action is to Convert the interface of a class into another interface the clients expect. Adapter lets classes work together that couldn_t otherwise because of inpatibility interface (from Design Patterns Elements of Reusable OO Software by Gof). The client in this instance is the ActionServlet that knows nothing about our specific business class interface. Therefore, Struts provides a business interface it does understand, Action. By extending the Action, we make our business interface patible with Struts business interface. (An interesting observation is that Action is a class and not an interface. Action started as an interface and changed into a class over time. Nothing39。 JSP 1 Introduction Kids in grade school put HTML pages on the Inter. However, there is a monumental difference between a grade school page and a professionally developed Web site. The page designer (or HTML developer) must understand colors, the customer, product flow, page layout, browser patibility, image creation, JavaScript, and more. Putting a great looking site together takes a lot of work, and most Java developers are more interested in creating a great looking object interface than a user interface. JavaServer Pages (JSP) technology provides the glue between the page designer and the Java developer. If you have worked on a largescale Web application, you understand the term change. ModelViewController (MVC) is a design pattern put together to help control change. MVC decouples interface from business logic and data. Struts is an MVC implementation that uses Servlets and JSP tags, from the J2EE specifications, as part of the implementation. You may never implement a system with Struts, but looking at Struts may give you some ideas on your future Servlets and JSP implementations. 2 ModelViewController (MVC) JSP tags solved only part of our problem. We still have issues with validation, flow control, and updating the state of the application. This is where MVC es to the rescue. MVC helps resolve some of the issues with the single module approach by dividing the problem int
點擊復(fù)制文檔內(nèi)容
法律信息相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1