【正文】
ork connection, from a configuration file take some parameters, such as, in jspDestory () release of the corresponding resources. Based on a Java language has many other techniques JSP page dynamic characteristics, technical have embodied in the following aspects: One simplicity and effectiveness The JSP dynamic web pages with the pilation of the static HTML pages of writing is very similar. Just in the original HTML page add JSP tags, or some of the proprietary scripting (this is not necessary). So, a familiar with HTML page write design personnel may be easily performed JSP page development. And the developers can not only, and write script by JSP tags used exclusively others have written parts to realize dynamic pages. So, an unfamiliar with the web developers scripting language, can use the JSP make beautiful dynamic pages. And this in other dynamic web development is impossible. Tow the independence of the program The JSP are part of the family of the API Java, it has the general characteristics of the crossplatform Java program. In other words, is to have the procedure, namely the independence of the platform, 6 Write bided anywhere! . Three procedures patibility The dynamic content can various JSP form, so it can show for all kinds of customers, namely from using HTML/DHTML browser to use various handheld wireless equipment WML (for example, mobile phones and pdas), personal digital equipment to use XML applications, all can use B2B JSP dynamic pages. Four program reusability In the JSP page can not directly, but embedded scripting dynamic interaction will be cited as a ponent part. So, once such a ponent to write, it can be repeated several procedures, the program of the reusability. Now, a lot of standard JavaBeans library is a good example. JSP 技術(shù)簡介及特點 JSP( Java Server Pages)技術(shù)是由 Sun 公司發(fā)布的用于開發(fā)動態(tài) Web 應(yīng)用的一項技術(shù)。下面結(jié)合這些技術(shù)的介紹,講述動態(tài)網(wǎng)頁技術(shù)的發(fā)展和 JSP 技術(shù)的誕生。 對于這個問題的一個早期解決方案是使用 CGIBIN 接口。例如,像 Java Servlet 這樣的技術(shù)就可以使得用 Java 語言編寫交互的應(yīng)用程序的服務(wù)器端的代碼變得容易。這個方案將解決當(dāng)前方案所受到的限制。其結(jié)果是產(chǎn)生了一種新的、開發(fā)基于 Web 應(yīng)用程序的方法,給予使用基于組件應(yīng)用邏輯的頁面設(shè)計者以強大的功能。這是最初外在對象。 如果 out JspWriter 對象數(shù)據(jù)緩沖區(qū)滿 , 則取決于 autoFlush 屬性值,緩沖內(nèi)容自動輸入到 ServletResponse output stream ,消除溢出;或拋出緩沖溢出的信號。聲明中指出 Java 和 JavaScript 將互相補充,但它們是截然不同的技術(shù),這樣才打消了很多人對這兩項技術(shù) 的錯誤理解。 Web 應(yīng)用程序使用導(dǎo)入機制在任何所需的位置導(dǎo)入這些信息,因為這樣可以很容易地在一個地方改變內(nèi)容,然后維持在所有使用它的代碼中。 希望在 JSP 中根據(jù)從配置文件取得的值,動態(tài)地導(dǎo)入文件。 在一個 JSP文件第一次被請求時, JSP引擎把該 JSP文件轉(zhuǎn)換成為一個 Servlet。每個客戶端請求對應(yīng)一個線程。可在 jspInit()中進行一些初始化工作,如建立與數(shù)據(jù)庫的連接,或建立網(wǎng)絡(luò)連接,從配置文件中取一些參數(shù)等,在 jspDestory()中釋放相應(yīng)的資源。換句話說,就是擁有程序的對平臺的獨立性,即 Write once, Run anywhere!。使用 c:import JSTL 核心標記。而這在其他的動態(tài)網(wǎng)頁開發(fā)中是不可實現(xiàn)的。當(dāng)這種情況發(fā)生時 jspDestroy()方法首先被調(diào)用。對每一個請求, JSP 引擎創(chuàng)建一個新的線程來處理該請求。 include 元素。 希望在 JSP 每次接收請求時,而不是在 JSP 轉(zhuǎn)換為 servlet 時導(dǎo)入內(nèi)容。 ECMA將其腳本語言命名為 ECMAScript。Netscape 于 1995 年首先提出了 JavaScript,但當(dāng)時將其稱為 LiveScript。典型 臨時數(shù)據(jù)流添加到先前的輸出流, 隨后輸出數(shù)據(jù)流再分配到先前數(shù)據(jù)流 (嵌套 )。 首先 , 定義一個 JspWriter 對象,這個對象不同于 ()返回對象。 JSP 規(guī)范是 Web 服務(wù)器、應(yīng)用服務(wù)器、交易系統(tǒng)以及開發(fā)工具供應(yīng)商間廣泛合作的結(jié)果。采用這種方法,生成帶有動態(tài)內(nèi)容的頁面仍然需要應(yīng)用程序的開發(fā)技巧。例如,微軟的 Active Server Pages( ASP)技術(shù)使得在 Web 頁面上創(chuàng)建動態(tài)內(nèi)容更加容易,但也只能工作在微軟的 IIS 和Personal Web Server 上。 這些快速增長的精巧的基于 Web 的應(yīng)用程序要求開發(fā)技術(shù)上的改進。 JSP 技術(shù)的設(shè)計目的是使得構(gòu)造基于Web 的應(yīng)用程序更加容易和快捷,而這些應(yīng)用程序能夠與各種 Web 服務(wù)器、應(yīng)用服務(wù)器、瀏覽器和開發(fā)工具共同工作。ll have to edit and repile the Servlet Java, even in logic has been able to run. Using this method, the dynamic content with the application of the page still need to develop skills. Obviously, what is needed is a industry to create dynamic content within the scope of the pages of the solution. This program will solve the current scheme are limited. As follows: pidly developing and testing. The JSP technology is designed to meet such requirements. The JSP specification is a Web server, application server, trading system and develop extensive cooperation between the tool suppliers. From this standard to develop the existing integration and balance of Java programming environment (for example, Java Servlet and JavaBeans) support techniques and tools. The result is a kind of new and developing method based on Web applications, using ponentbased application logic page designers with powerful functions. Overall Semant