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

正文內(nèi)容

jsp技術(shù)概述與應(yīng)用框架外文翻譯-jsp程序-文庫(kù)吧資料

2025-01-27 06:39本頁(yè)面
  

【正文】 very well designed and is similar to Java, fewer programmers are familiar with either the core C syntax or the many auxiliary libraries. In addition, many developers still use the original version of ASP. With this version, JSP has a clear advantage for the dynamic code. With JSP, the dynamic part is written in Java, not VBScript or another ASPspecific language, so JSP is more powerful and better suited to plex applications that require reusable ponents. You could make the same argument when paring JSP to the previous version of ColdFusion。 you aren39。 外文原文 Overview of JSP Technology and JSP application frameworks Autor: Zambon Giulio/ Sekler Michael Source: SpringerVerlag New York Inc 1. Benefits of JSP JSP pages are translated into servlets. So, fundamentally, any task JSP pages can perform 畢業(yè)設(shè)計(jì)外文翻譯 10 could also be acplished by servlets. However, this underlying equivalence does not mean that servlets and JSP pages are equally appropriate in all scenarios. The issue is not the power of the technology, it is the convenience, productivity, and maintainability of one or the other. After all, anything you can do on a particular puter platform in the Java programming language you could also do in assembly language. But it still matters which you provides the following benefits over servlets alone: ? It is easier to write and maintain the HTML. Your static code is ordinary HTML: no extra backslashes, no double quotes, and no lurking Java syntax. ? You can use standard Website development tools. Even HTML tools that know nothing about JSP can be used because they simply ignore the JSP tags. ? You can divide up your development team. The Java programmers can work on the dynamic code. The Web developers can concentrate on the presentation layer. On large projects, this division is very important. Depending on the size of your team and the plexity of your project, you can enforce a weaker or stronger separation between the static HTML and the dynamic content. Now, this discussion is not to say that you should stop using servlets and use only JSP instead. By no means. Almost all projects will use both. For some requests in your project, you will use servlets. For others, you will use JSP. For still others, you will bine them with the MVC architecture . You want the appropriate tool for the job, and servlets, by themselves, do not plete your toolkit. of JSP Over Competing Technologies A number of years ago, Marty was invited to attend a small 20person industry roundtable discussion on software technology. Sitting in the seat next to Marty was James Gosling, inventor of the Java programming language. Sitting several seats away was a highlevel manager from a very large software pany in Redmond, Washington. During the discussion, the moderator brought up the subject of Jini, which at that time was a new Java technology. The moderator asked the manager what he thought of it, and the manager responded that it was too early to tell, but that it seemed to be an excellent idea. He went on to say that they would keep an eye on it, and if it seemed to be catching on, they would follow his pany39。我們也說(shuō)明了 Model 2 應(yīng)用架構(gòu),以及它如何用來(lái)將servlets 和 JSP 在結(jié)合在同一個(gè)應(yīng)用之中。 小結(jié): 在本文中,我們介紹了 Struts 應(yīng)用框架。它提供一個(gè)控制器servlet 來(lái)處理導(dǎo)航流和一些特殊類(lèi)來(lái)幫助數(shù)據(jù)訪問(wèn)。 HTML 開(kāi)發(fā)人員可以改變程序的外觀和感覺(jué),并不需要改變后端 servlet 的工作方式。 Model 2 使 Java 工程師和HTML 設(shè)計(jì)者分別工作于它們所擅長(zhǎng)和負(fù)責(zé)的部分。在其后的規(guī)范中, Model 2 這個(gè)叫法消失了,但它已經(jīng)在 Java web 開(kāi)發(fā)人員中非常通用了。一個(gè)頁(yè)面的動(dòng)態(tài)數(shù)據(jù)可以使用一個(gè) JavaBean來(lái)傳遞,并且 JSP 標(biāo)記可以隨后使用 bean的屬性來(lái)定制頁(yè)面的輸出。 Sun引入 JavaBean是為了用于 GUI 組件,但它們已經(jīng)用在Java 開(kāi)發(fā)的各個(gè)方面,包括 Web 應(yīng)用。其他組件可以使用 Java 的反 射 API 通過(guò)查找前綴為 set、 is 或者 get 的方法來(lái)發(fā)現(xiàn) JavaBean的屬性。邏輯訪問(wèn)器在其方法體中不能接受參數(shù)。屬性名的首字母必須大寫(xiě)。 屬性 weight 的訪問(wèn)器方法體可能是: public Double getWeight() 如果訪問(wèn)器返回一個(gè)邏輯值,這種情況下有個(gè)變體模式。簡(jiǎn)單屬性的 Accessor 在其方法體中不能接受參數(shù)。屬性名的第一個(gè)字母必須大寫(xiě)。例如,對(duì) Double 類(lèi)型的屬性 weight 的 mutator 方法體可能是: public void setWeight(Double weight) 相似的設(shè)計(jì)模式也用于訪問(wèn)器方法的創(chuàng)建。簡(jiǎn)單屬性的 mutator在其方法體中可能只有一個(gè)參數(shù), 該參數(shù)可以是各種類(lèi)型。屬性名的第一個(gè)字母必須大寫(xiě)。 JavaBean 設(shè)計(jì)模式提供兩種類(lèi)型的方式來(lái)訪問(wèn) bean 的內(nèi)部狀態(tài):訪問(wèn)器( accessor) 用來(lái)讀 JavaBean的狀態(tài),修改器( mutator )用來(lái)改變 JavaBean 的狀態(tài)。 4.這個(gè)語(yǔ)句導(dǎo)入將在本頁(yè)中使用的標(biāo)簽庫(kù),并分配給它一個(gè)前綴。 3.在你的 Web 應(yīng)用描述符 ()中定義你的 taglib 元素。這些方法獲得一個(gè) JspWriter 對(duì)象,你可以用它來(lái)輸出你需要的 HTML內(nèi)容。眾所周知,屬性名稱(chēng)也符合這種模式,其他 JAVA 類(lèi)可以通過(guò)自省機(jī)制發(fā)現(xiàn)和操作這些 JavaBean 屬性。要編寫(xiě) JavaBean,類(lèi)必須是具體類(lèi)和公共類(lèi),并且具有無(wú)參數(shù)的構(gòu)造器( NONARGS CONSTRUCTOR)。 JavaBean: JavaBean 是一種 Java 類(lèi),它遵從一定的設(shè)計(jì)模式,使它們易于和其他開(kāi)發(fā)工具和組件一起使用 。重要的是記住, JSP 頁(yè)面事實(shí)上是一個(gè) servlet。如果,JSP 文件自上次編譯以來(lái)被修改了,容器將重新翻譯和編譯 JSP 文件。當(dāng)一個(gè)客戶(hù)請(qǐng)求 JSP 頁(yè)面時(shí),容器將頁(yè)面翻譯成 Java servlet 源代 碼文件,并將它編譯成 Java 類(lèi)文件 —— 就象你寫(xiě)的servlet 文件一樣。你可以在 JSP 頁(yè)畢業(yè)設(shè)計(jì)外文翻譯 8 面中很容易的識(shí)別出腳本元素,他們被封裝在一對(duì) % 和 %標(biāo)記中。為將動(dòng)態(tài)內(nèi)容引入頁(yè)面,開(kāi)發(fā)人員可以將腳本元素置入頁(yè)面之中。 為解決這個(gè)問(wèn) 題, Sun提出了一個(gè)將腳本和模板技術(shù)結(jié)合到一個(gè)組件中的服務(wù)器頁(yè)面技術(shù)( JavaServer Pages)。 它們喜歡 HTML設(shè)計(jì)人員處理表現(xiàn)層的工作,而 Java 工程師則專(zhuān)注于業(yè)務(wù)邏輯。隨著應(yīng)用越來(lái)越復(fù)雜, Java 開(kāi)發(fā)人員將不再扮演 HTML 頁(yè)面設(shè)計(jì)的角色。 在產(chǎn)生 HTTP 響應(yīng)的 Servlet 中是很普遍的。比如這樣的代碼: (POne line of HTML./P)。 JavaServer Pages: 雖然 servlets 對(duì) CGI 程序來(lái)說(shuō)前進(jìn)了一大步,但它也不是萬(wàn)能靈藥。 Servlet 的另一個(gè)好處是,它是多線(xiàn)程的, servlet 開(kāi)發(fā)人員必須特別注意確保它們的servlet 是線(xiàn)程安全的。 Servlet 開(kāi)發(fā)人員可以使用 init() 方法保持對(duì)昂貴資源的引用,比如到數(shù)據(jù)庫(kù)或者 EJB Home 接口的連接 ,以便它們可以在不同的請(qǐng)求之間進(jìn)行共享。 Java 線(xiàn)程可比使用 CGI 程序的服務(wù)器處理開(kāi)銷(xiāo)小多了。但和 CGI 程序不同,并不是針對(duì)每個(gè)請(qǐng)求都要?jiǎng)?chuàng)建一個(gè)新的 servlet。每 servlet 都可以聲明它可以處理何種樣式的 URL。為了使常規(guī) web servers 能訪問(wèn) servlet, servlet 被安插在一個(gè)容器之中。 Servlet 本身是要編譯成字節(jié)碼的 Java 類(lèi),就像其他 Java 對(duì)象一樣。它接受請(qǐng)求并產(chǎn)生響應(yīng)。其次,一次編寫(xiě),隨處運(yùn)行的 JAVA 特性意味著 servlet 在有 JVM 的操作系統(tǒng)間是輕便的可移動(dòng)的。 CGI 程序的另一個(gè)缺點(diǎn)是平臺(tái)依賴(lài)性,一個(gè)平臺(tái)上開(kāi)發(fā)的程序不一定在另一個(gè)平臺(tái)上能運(yùn)行。 CGI 的主要缺點(diǎn)是它必須為每個(gè)請(qǐng)求運(yùn)行一個(gè)程序。 CGI 定義了一套關(guān)于什么信息將作為環(huán)境變量傳遞,以及它希望怎樣使用標(biāo)準(zhǔn)輸入和輸出的慣例。當(dāng) web 服務(wù)器接收到一個(gè)對(duì) CGI 程序的請(qǐng)求時(shí),它便運(yùn)行這個(gè)程序并向其提供它請(qǐng)求里面所包含的信息。 CGI 使用標(biāo)準(zhǔn)的操作系統(tǒng)特征,比如環(huán)境變量和標(biāo)準(zhǔn)輸入輸出,在 Web 服務(wù)器間以及和主機(jī)系統(tǒng)間創(chuàng)建橋接和網(wǎng)關(guān)。相反,動(dòng)態(tài)內(nèi)容是臨時(shí)產(chǎn)生的,典型地,它是針對(duì)瀏覽器的個(gè)別請(qǐng)求的響應(yīng)。 定義: 靜態(tài)內(nèi)容直接來(lái)自于文本或數(shù)據(jù)文件,比如 HTML或者 JPEG 文件。用戶(hù)點(diǎn)擊連接將產(chǎn)生另一個(gè)請(qǐng)求,就開(kāi)始一個(gè)新的處理過(guò)程。通常這里的文件使用 Hypertext Markup Language (HTML) [W3C,HTML] 格式化,以使瀏覽器可以顯示它們。對(duì)其本身來(lái)說(shuō),標(biāo)準(zhǔn)的 HTTP web 服務(wù)器并不傳輸動(dòng)態(tài)內(nèi)容。 URL重寫(xiě)是在頁(yè)面地址中存儲(chǔ)一個(gè)特殊的標(biāo)記, Java 服務(wù)器可以用它來(lái)跟蹤用戶(hù) 。 Cookies 和 URL 重寫(xiě)是兩個(gè)在請(qǐng)求間跟蹤用戶(hù)狀態(tài)的方式。服務(wù)器接受請(qǐng)求,發(fā)出響應(yīng),并且繼續(xù)愉快地處理文本請(qǐng)求。狀態(tài)行后,服
點(diǎn)擊復(fù)制文檔內(nèi)容
試題試卷相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1