【正文】
and either never or rarely changes, such as an anization39。s Active Server mix (ASP) technology in the Web page to create dynamic content more easily, but also can work in Microsoft on Personal Web Server and IIS. There are other solutions, but cannot make an ordinary page designers can easily master. For example, such as the Servlet Java technologies can use Java language interaction application server code easier. Developers to write such Servlet to receive signals from the Web browser to generate an HTTP request, a dynamic response (may be inquires the database to finish the request), then send contain HTML or XML documents to the response of the browser. one is based on a Java Servlet Java technical operation in the server program (with different, the latter operating in the Applet browser end). In this book the Servlet chapter 4. Using this method, the entire page must have made in Java Servlet. If developers or Web managers want to adjust page, you39。使用 JSP 技術(shù)的 Web 頁面可以很容易地顯示動(dòng)態(tài)內(nèi)容。這樣,軟件工業(yè)正迅速地向建造基于瀏覽器客戶端的多層次應(yīng)用程序邁進(jìn)。這些解決方案是與特定的 Web 服務(wù)器相關(guān)的,不能解決跨多個(gè)供應(yīng)商的解決方案的問題。如果開發(fā)人員或者Web 管理人員想要調(diào)整頁面顯示,就不得不編輯并重新編譯該 Java Servlet,即使在邏輯上已經(jīng)能夠運(yùn)行了。 JSP 技術(shù)就是被設(shè)計(jì)用來滿足這樣的要求的。)描述是根據(jù) JspWriter 對象它通過隱含對象暴露。參照 ,“Internationalization Issues”. 在一些動(dòng)作主體中,輸出不同于 JspWriter 對象實(shí)例的再分配,這取決于動(dòng)作的細(xì)節(jié)。 JavaScript 是用于瀏覽器的第一種具有通用目的、動(dòng)態(tài)的客戶端腳本語言。 Microsoft 和Netscape 都支持一種圍繞 JavaScript 和 JScript 的核心特性并由( European Computer Manufacturers Association, ECMA)標(biāo)準(zhǔn)組織控制的腳本語言標(biāo)準(zhǔn)。在導(dǎo)入 JSP 頁面中使用 include 指令,并給予被導(dǎo)入的 JSP 代碼段 .jsp 擴(kuò)展名。如果要在翻譯階段進(jìn)行導(dǎo)入,使用 jsp:directive。 ( 4) jspService()方法被調(diào)用來處理客戶端的請求。此外,在任何時(shí)候如果由于系統(tǒng)資源不足的原因, JSP 引擎將以某種不確定的方式將 Servlet 從內(nèi)存中移去。這樣,一個(gè)不熟悉腳本語言的網(wǎng)頁開發(fā)者,完全可以利用 JSP 做出漂亮的動(dòng)態(tài)網(wǎng)頁。 欲從導(dǎo)入文件的上下文之外導(dǎo)入 JSP 代碼段。 3.程序的兼容性 JSP 中的動(dòng)態(tài)內(nèi)容可以各種形式進(jìn)行顯示,所以它可以為各種客戶提供服務(wù),即從使用 HTML/DHTML 的瀏覽器,到使用 WML 的各種手提無線設(shè)備(例如,移動(dòng)電話和個(gè)人數(shù)字設(shè)備 PDA),再到使用 XML 的 B2B 應(yīng)用,都可以使用 JSP 的動(dòng)態(tài)頁面。 基于 Java 語言的 JSP 技術(shù)具有很多其他動(dòng)態(tài)網(wǎng)頁技術(shù)所沒有的特點(diǎn),具體表現(xiàn)在如下方面: 1.簡便性和有效性 JSP 動(dòng)態(tài)網(wǎng)頁的編寫與一般的靜態(tài) HTML 的網(wǎng)頁編寫是十分相似的。以多線程方式執(zhí)行可以大大降低對系統(tǒng)的資源需求,提高系統(tǒng)的并發(fā)量及響應(yīng)時(shí)間。而這個(gè)引擎本身也是一個(gè) Servlet。使用 jsp:include標(biāo)準(zhǔn)動(dòng)作。有些信息是靜態(tài)的,永遠(yuǎn)不會(huì)或很少會(huì)改變,如組織的 logo。 JavaScript 為創(chuàng)建用戶界面控件提供了一種腳本語言。如果 JspWriter 不溢出 , 寫入的內(nèi)容將被直接送入 ServletResponse 輸出流。JSP 頁作者對于 PrintWriter 或 OutputStream 相關(guān)的 ServletResponse 被禁止寫直接寫入。 2 JSP 頁整體語義 JSP 頁實(shí)施類定義一個(gè) _ jspService() 方法映射反應(yīng)對象的請求。如下: 能夠在任何 Web 或應(yīng)用程序服務(wù)器上運(yùn)行。開發(fā)人員能夠編寫出這樣的 Servlet,以接收來自Web 瀏覽器的 HTTP請求,動(dòng)態(tài)地生成響應(yīng)(可能要查詢數(shù)據(jù)庫來完成這項(xiàng)請求),然后發(fā)送包含 HTML 或 XML 文檔的響應(yīng)到瀏覽器。開發(fā)人員編寫與接口相關(guān)的單獨(dú) 的程序,以及基于 Web 的應(yīng)用程序,后者通過 Web 服務(wù)器來調(diào)用前者。 1 JSP 的開發(fā)背景及發(fā)展歷史 在萬維網(wǎng)短暫的歷史中,萬維網(wǎng)已經(jīng)從一個(gè)大部分顯示靜態(tài)信息的網(wǎng)絡(luò)演化到對股票進(jìn)行交易和進(jìn)行購書操作的一個(gè)基礎(chǔ)設(shè)施。它以其簡單易學(xué)、跨平臺(tái)的特性,在眾多動(dòng)態(tài) Web 應(yīng)用程序設(shè)計(jì)語言中異軍突起,在短短幾年中已經(jīng)形成了一套完整的規(guī)范,并廣泛地應(yīng)用于電子商務(wù)等各個(gè)領(lǐng)域中。 畢業(yè)設(shè)計(jì)說明書 英文文獻(xiàn)及中文翻譯 班 級(jí): 學(xué)號(hào): 姓 名: 學(xué) 院: 專 業(yè): 指導(dǎo)教師: JSP Technology Conspectus And Specialties The JSP (Java Server mix) technology is used by the Sun microsystem issued by the pany to develop dynamic Web application technology. With its easy, crossplatform, in many dynamic Web application programming languages, in a short span of a few years, has formed a plete set of standards, and widely used in electronic merce, etc. In China, the JSP now also got more extensive attention, get a good development, more and more dynamic website to JSP technology. The related technologies of JSP are briefly introduced. The JSP a simple technology can quickly and with the method of generating Web pages. Use the JSP technology Web page can be easily display dynamic content. The JSP technology are designed to make the construction based on Web applications easier and efficient, and these applications and various Web server, application server, the browser and development tools work together. The JSP technology isn39。在國內(nèi), JSP 現(xiàn)在也得到了比較廣泛的重視,得到了很好的發(fā)展,越來越多的動(dòng)態(tài)網(wǎng)站開始采用 JSP 技術(shù)。在各種各樣的應(yīng)用程序中,對于可能使用的基于 Web 的客戶端,看上去沒有任何限制。這個(gè)方案有著嚴(yán)重的擴(kuò)展性問題 ——每個(gè)新的 CGI 要求在服務(wù)器上新增一個(gè)進(jìn)程。 注意:一個(gè) Java Servlet 就是一個(gè)基于 Java 技 術(shù)的運(yùn)行在服務(wù)器端的程序(與Applet 不同,后者運(yùn)行在瀏覽器端)。 將應(yīng)用程序邏輯和頁面顯示分離。這些變革細(xì)節(jié)是具體用于腳本語言 (參見 Chapter , “Script