版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、<p><b> 中文3837字 </b></p><p> 基于JSP網(wǎng)頁自動(dòng)生成工具的設(shè)計(jì)與實(shí)現(xiàn)</p><p> Produce the design of the tool and realizeautomatically on the basis of JSP web page</p><p> 學(xué) 院
2、: 計(jì)算機(jī)與信息科學(xué)學(xué)院 </p><p> 專 業(yè): 信息與計(jì)算科學(xué) </p><p> Produce the design of the tool and realize </p><p> automatically on the basis of JSP web page</p>
3、<p> Alfred V.Aho and John E.Hopcroft</p><p> It is an important respect that Internet uses that Web develops technology, and JSP is the most advanced technology that Web is developed, it is present W
4、eb developer's first-selected technology. But because JSP has relatively high expectations for Web developer, a lot of general Web developers can not use this advanced technology. The discussion produces the design o
5、f the tool and realizes automatically on the basis of JSP web page of the template and label storehouse, put forward concrete desi</p><p> With the popularization of WWW (World Wide Web), the technology of
6、the dynamic web page is developed rapidly too. From original CGI (Common Gateway Interface) to ASP (Active Server Page), have met the web page developer to the demand for developing technology of the dynamic web page to
7、a certain extent. But no matter CGI or ASP have certain limitation, for instance, consuming to resources of the server of CGI, ASP can only be used etc. with Microsoft IIS, all these have limited scope of applicat</p&
8、gt;<p> JSP (Java Server Page) technology is designed and used for responding to the request that like this. JSP is developed technology by the new web page that Sun Micro System Company put out in June of 1999,
9、it is that Web based on Java Serv-let and the whole Java system develops technology, and Servlet2. Expansion of 1API. Utilize this technology, can set up advanced, safely and stepping dynamic websites of the platform. &l
10、t;/p><p> Java is the future mainstream to develop technology, have a lot of advantages. JSP is Java important application technology on Internet/Intranet Web, get extensive support and admit, it can conbine w
11、ith various kinds of Java technology together intactly, thus realize very complicated application.</p><p> As a kind of technology of development based on text, taking showing as centre, JSP has offered all
12、 advantages of Java Servlet. Logic function in order to make sure and showing the function was separated, JSP can already work with JavaBeans, Enterprise JavaBeans (EJB) and Servlet. The developer of JSP can finish the w
13、ork that majority and website's logic are correlated with through using JavaBeans, EJB and Servlet, and only assign the work shown to JSP page to finish. Content and show advantage </p><p> JSP develops
14、 technology as the web page of the mainstream at present, has the following characteristics</p><p> Separate the formulation and showing of the content: Using JSP technology, the page developer of Web can u
15、se HTML or XML identification to design and format the final page. Use JSP identification or bound foot turn into dynamic content of page actually (whether content according to is it come change to ask). Produce logic of
16、 content of the identification and JavaBeans package, truss up of the little script encapsulation, all scripts run in the end of the server. If key logic among identification</p><p> Emphasize the reusable
17、package: Most JSP pages depend on the reusable one, the package stepping the platform finish more complicated treatment with required application program. Benefitting from the independence of operating platform of Java,
18、the developer can be very convenient to share and exchange and carry out the ordinary package that operated, or make these packages used by more users. The method based on package has accelerated the total development co
19、urse, the efficiency of improving the</p><p> Though JSP is powerful, it requires the web page developer should be quite familiar with Java. There are still relatively few Java programmers now, for general
20、web page developer, the grammar of JSP is more difficult to grasp. So, need a kind of web page developing instrument and offer commonly used JSP application to general web page developer, is it understand general page de
21、velop developer of technology (HTML) can use strong function of JSP too only to let.</p><p> Systematic design object and main technology of use</p><p> Design object: System this design objec
22、t for understand but HTML understand general web page developer of JSP offer a web page developing instrument at all only, enable them to follow the systematic file, use the daily function of JSP through the label, produ
23、ce one finally and only include static HTML and dynamic JSP web page of JSP label.</p><p> Main technology: This system is in the design, consider using the technology of the template and JSP label to reali
24、ze mainly.</p><p> Technology of the template: The technology of the template is widely applied to various kinds of development and application system. It produces some commonly used frame structure in adva
25、nce, uses the family to choose the template from the template storehouse conveniently according to the needs of one's own one, is it is it put up to go again by oneself to need, save construction period in user, faci
26、litate use of user. In this system, classify the page according to the function type, sum up the </p><p> Storehouse technology of the label: In JSP, movements can create and visit the language target of th
27、e procedure and influence the element exported and flowed. JSP has defined six standard movements. Except six standard movement these, user can define own movement finish the specific function. These movements are known
28、as the customer movement, they are the reusable procedure module. Through movement these, programmer can some encapsulation stand up too display function of page in JSP page, make </p><p> JSP label storeho
29、use is that one kind produces the method based on script of XML through JavaBeans. It is one of the greatest characteristics of JSP. Through the label storehouse, can expand JSP application unrestrictedly, finish any com
30、plicated application demand.</p><p> JSP label storehouse has the following characteristic</p><p> Easy to use: The labels in JSP and general HTML marks are totally the same in </p><
31、;p> appearance, it is as convenient as ordinary HTML mark to use.</p><p> The easy code is paid most attention to: Every label in the label storehouse can finish certain function. Define ready to eat on
32、e label storehouse, is it pack one Jar file the label storehouse to need only, then only need use this label storehouse in other systems afterwards, needn't develop codes again, has raised the system and developed ef
33、ficiency greatly, have reduced the development cost.</p><p> The easy code is safeguarded: All application logic is encapsulated in label processor and JavaBeans, all labels concentrate on a label storehous
34、e. If need to upgrade codes or need to revise the function on a web page, only need to revise the corresponding label. Maintain way in unison through this kind, it is unnecessary in each web page is it is it fix to act a
35、s to get onning, have reduce the work load safeguarded greatly, has economized the cost of safeguarding.</p><p> The easy system is expanded: If need to add the new function to the system, only need to defi
36、ne a new label to finish this function, do not need to do any change to other respects of the system. Can inherit JSP normal characteristics of various fields in the label storehouse. Can expand and increase the function
37、 of JSP unrestrictedly like this, and does not need to wait for the appearance of the next edition JSP .</p><p> Systematic composition and realizing</p><p> The system making up: This system
38、is made up of four parts mainly</p><p> The database joins some: This system supports several daily databases, including Oracle, Sybase, MSSQLServer, My SQL and DB2, use JDBC and database to link to each ot
39、her according to database type and database name, user name, password that users offer that users choose. The basic form of system produces some: After joining with the database, produce the basic form TC-Tables and
40、TC-Columns of two systems according to the user name linking to each other with the database, TC-Tables form inclu</p><p> The template is chosen some: The system offers the template to user and chooses the
41、 interface, let users choose the templates used from the template storehouse according to the need.</p><p> The template is dealt with some: According to template that user choose, system transfer designate
42、d template deal with module is it punish to go on to these template. When dealing with the label that the procedure meets in the template, offer the mutual interface to user, let user input parameter for designated label
43、, prove system validity of label that user input. Finished the formulation of JSP page systematically finally.</p><p> Web page preview is with revising some: After the web page was produced out, the system
44、 has offered a web page preview window and code to user and looked over that revises the window. Through this preview window, users can look at the result of JSP page produced out in advance. If user static result of res
45、pect in page very satisfied, user can through code look over revise window revise HTML code of code. If users have further demands for the static result of the page, the system has also offered</p><p> Real
46、ization of the template storehouse and label storehouse</p><p> The planning and design of the label storehouse are essential in the whole system design, efficiency that the degree and system that are put i
47、n an position have operated that its relation has reached codes. Its planning should follow the following principle . Should try one's best little including static HTML among label. To general user, the label is
48、transparent. Users can not look over and revise labels. If include too many static HT-ML sentence in the label, will influence the modificatio</p><p> Facilitate users' use. While designing the label st
49、orehouse, should fully consider users' operating position, it can very easy and understanding and using labels conveniently to use the family.</p><p> Definition of the label storehouse: Define a label
50、storehouse, must define a label storehouse and describe the file (TLD) at first. This is a file of script based on XML, have defined the edition of XML in this file, codes used, the edition, name and definition and param
51、eter of all labels included in this storehouse of the label storehouse of the edition of the label storehouse, JSP used describe, including the name of the label, corresponding Javas of label, description information of
52、the label</p><p> Realization of the label: One label first special Java type, this each must inherit TagSupports, this each is in javax. servlet. jsp. Define in tagext bag. In the labels, the parameter whi
53、ch includes this label initializes the subject treatment method (Handler) of method (Set/Get), label and method available for making the first class label to adjust,etc..</p><p> Realization of the template
54、: A template is that one contains JSP file that labels quoted. In order to quote the labels defined in the template, must introduce the label storehouse at first . Among them uri appoints the label storehouse to desc
55、ribe the route of the file ; Prefixes used when prefix appoints to quote labels.While quoting the designated label in the template, use the designated prefix while introducing the label storehouse, appoint the name of th
56、e label; It is the parameter assi</p><p> What this systematic subject procedure making is used is JBuilder 6.0 of Borland Company, it is Front-Page2000 of Microsoft Company that the template is developed a
57、nd used, what the label storehouse is developed and used is UltraEdit editing machine, what JDK is adopted is JDK1. 4. The system testing environment is JRun3. 0.</p><p> Java future mainstream to develop l
58、anguage, and Java using JSP will become major technology that Web will be developed in the future too mainly at Web. This system has adopted the label storehouse, one of the biggest characteristics of JSP, enable the gen
59、eral Web developer to use JSP strong dynamic page function conveniently too, develop JSP dynamic Web page of the modern techniques. Because this system adopts Java to develop, can run under the operating system of any su
60、pport graphic interface, </p><p> List of references: [1] Cay S. Horstmann,Gary Cornell. Java 2 key technology (CoreJava 2) [M ].</p><p> Beijing: Publishing house of the mechanical indus
61、try.</p><p> [2] Bruce Eckel. Java programming thought (Thinking in Java) [M ]. Beijing:</p><p> Publishing house of the mechanical industry.</p><p> [3] Joseph L. Weber. Java
62、2 programming is explained in detail (Using Java 2) [M ].</p><p> Beijing: Electronic Industry Press.</p><p> [4] Borland Company. Building Applications with JBuilder.</p><p> 基
63、于JSP網(wǎng)頁自動(dòng)生成工具的設(shè)計(jì)與實(shí)現(xiàn)</p><p> Alfred V.Aho and John E.Hopcroft</p><p> Web開發(fā)技術(shù)是Internet應(yīng)用的一個(gè)重要方面,而JSP又是Web開發(fā)的最先進(jìn)的技術(shù),是當(dāng)前Web開發(fā)人員的首選技術(shù)。但是由于JSP對(duì)Web開發(fā)人員要求較高,所以許多一般的Web開發(fā)人員還不能夠使用這一項(xiàng)先進(jìn)的技術(shù)。討論基于模板和標(biāo)簽庫的JSP
64、網(wǎng)頁自動(dòng)生成工具的設(shè)計(jì)和實(shí)現(xiàn),提出具體的設(shè)計(jì)思想和實(shí)現(xiàn)方法。 </p><p> 隨著WWW(World Wide Web)的普及,動(dòng)態(tài)網(wǎng)頁技術(shù)也急速發(fā)展。從原來的CGI(Common Gateway In-terface)到ASP(Active Server Page),都從某種程度上滿足了網(wǎng)頁開發(fā)人員對(duì)動(dòng)態(tài)網(wǎng)頁開發(fā)技術(shù)的需求。但是不管是CGI還是ASP都存在一定的局限性,如CGI對(duì)服務(wù)器資源的耗費(fèi),ASP只
65、能同Microsoft IIS一起使用等,這些都限制了這些技術(shù)的使用范圍,極大地阻礙了它們的推廣。廣大的頁面開發(fā)人員都熱切地盼望一種統(tǒng)一的頁面開發(fā)技術(shù),該技術(shù)應(yīng)該具有的特點(diǎn):與操作平臺(tái)無關(guān),能夠在任何Web或應(yīng)用程序服務(wù)器上運(yùn)行;將應(yīng)用程序邏輯和頁面顯示分離;提供代碼重用,簡(jiǎn)化開發(fā)基于Web的交互式應(yīng)用程序的過程。 </p><p> JSP(Java Server Page)技術(shù)就是被設(shè)計(jì)用來滿足這樣的要求的
66、。JSP是由Sun MicroSystem公司于1999年6月推出的新的網(wǎng)頁開發(fā)技術(shù),它是基于Java Serv-let以及整個(gè)Java體系的Web開發(fā)技術(shù),是Servlet2.1API的擴(kuò)展。利用這一技術(shù),可以建立先進(jìn)、安全和跨平臺(tái)的動(dòng)態(tài)網(wǎng)站。 </p><p> Java是未來的主流開發(fā)技術(shù),具有很多優(yōu)勢(shì)。JSP則是Java在Internet/Intranet Web上的重要應(yīng)用技術(shù),得到了廣泛的支持和承認(rèn)
67、,它可以和各種Java技術(shù)完好地結(jié)合在一起,從而實(shí)現(xiàn)非常復(fù)雜的應(yīng)用。 </p><p> 作為一種基于文本的、以顯示為中心的開發(fā)技術(shù),JSP提供了Java Servlet的所有好處。為了做到邏輯功能和顯示功能分開,JSP已經(jīng)可以和JavaBeans、Enterprise JavaBeans(EJB)和Servlet一起工作。JSP的開發(fā)人員可以通過使用JavaBeans、EJB和Servlet來完成大部分與網(wǎng)站
68、邏輯相關(guān)的工作,而僅僅把顯示的工作交給JSP頁面來完成。內(nèi)容和顯示邏輯分開的好處在于,更新頁面外觀的人員不必懂得Java代碼,而更新Java類的人員也不必是設(shè)計(jì)網(wǎng)頁的行家。這就可以用帶Java類的JSP頁面來定義Web模板,以建立一個(gè)具有相似外觀的頁面組成的網(wǎng)站。Java類完成數(shù)據(jù)提供,在模板中就沒有Java代碼,這意味著這些模板可以由一個(gè)HTML編寫人員來維護(hù)。 </p><p> JSP是當(dāng)前主流的網(wǎng)頁開發(fā)
69、技術(shù),它的主要特點(diǎn)</p><p> ?。?)將內(nèi)容的生成和顯示進(jìn)行分離:使用JSP技術(shù),Web頁面開發(fā)人員可以使用HTML或者XML標(biāo)識(shí)來設(shè)計(jì)和格式化最終的頁面。使用JSP標(biāo)識(shí)或者小腳本來生成頁面上的動(dòng)態(tài)內(nèi)容(內(nèi)容是根據(jù)請(qǐng)求來變化的)。生成內(nèi)容的邏輯被封裝在標(biāo)識(shí)和JavaBeans組件中,并且捆綁在小腳本中,所有的腳本在服務(wù)器端運(yùn)行。如果核心邏輯被封裝在標(biāo)識(shí)和JavaBeans中,那么其他人,如Web管理人員和
70、頁面設(shè)計(jì)者,能夠編輯和使用JSP頁面,而不影響內(nèi)容的生成。 </p><p> (2)強(qiáng)調(diào)可重用的組件:絕大多數(shù)JSP頁面依賴于可重用的、跨平臺(tái)的組件來完成應(yīng)用程序所要求的更為復(fù)雜的處理。得益于Java的操作平臺(tái)無關(guān)性,開發(fā)人員能夠很方便共享和交流執(zhí)行普通操作的組件,或者使得這些組件為更多的使用者所使用?;诮M件的方法加速了總體的開發(fā)過程,極大地提高了項(xiàng)目整體開發(fā)的效率。 </p><p&g
71、t; 雖然JSP功能強(qiáng)大,但是它要求網(wǎng)頁開發(fā)人員對(duì)Java要相當(dāng)熟悉。而現(xiàn)在Java程序員還比較少,對(duì)一般的網(wǎng)頁開發(fā)人員來說,JSP的語法還是比較難于掌握的。所以,就需要有一種網(wǎng)頁開發(fā)工具,為一般的網(wǎng)頁開發(fā)人員提供常用的JSP應(yīng)用,讓只懂得一般頁面開發(fā)技術(shù)(HTML)的開發(fā)人員也能夠使用JSP的強(qiáng)大功能。 </p><p> 系統(tǒng)設(shè)計(jì)目標(biāo)和使用的主要技術(shù): </p><p> 設(shè)計(jì)目
72、標(biāo):本系統(tǒng)的設(shè)計(jì)目標(biāo)是為只懂得HTML但完全不了解JSP的一般網(wǎng)頁開發(fā)人員提供一個(gè)網(wǎng)頁開發(fā)工具,使他們能夠根據(jù)系統(tǒng)文檔,通過標(biāo)簽使用JSP的常用功能,最后生成一個(gè)只包含靜態(tài)HTML和JSP標(biāo)簽的動(dòng)態(tài)JSP網(wǎng)頁。 </p><p> 主要技術(shù) :本系統(tǒng)在設(shè)計(jì)時(shí),主要考慮使用模板和JSP標(biāo)簽的技術(shù)來實(shí)現(xiàn)。 </p><p> 模板技術(shù) :模板技術(shù)被廣泛地應(yīng)用于各種開發(fā)和應(yīng)用系統(tǒng)中。它預(yù)先生
73、成一些常用的框架結(jié)構(gòu),使用戶可以根據(jù)自己的需要方便地從模板庫中選擇模板,而不用自己重新去搭建,節(jié)省了用戶的開發(fā)時(shí)間,方便了用戶的使用。在本系統(tǒng)中,將頁面按照功能類型進(jìn)行分類,歸納出常用的頁面類型,生成模板庫。 </p><p> 標(biāo)簽庫技術(shù) ,在JSP中,動(dòng)作是可以創(chuàng)造與訪問程序語言對(duì)象和影響輸出流的元素。JSP定義了六個(gè)標(biāo)準(zhǔn)的動(dòng)作。除了這六個(gè)標(biāo)準(zhǔn)動(dòng)作以外,用戶可以定義自己的動(dòng)作來完成特定的功能。這些動(dòng)作被稱為
74、客戶化動(dòng)作,它們是可重用的程序模塊。通過這些動(dòng)作,程序員就可以在JSP頁面中把頁面的顯示功能也部分地封裝起來,使整個(gè)頁面更加簡(jiǎn)潔和易于維護(hù)。在一個(gè)JSP頁面中,這些客戶化動(dòng)作是通過客戶化標(biāo)簽來調(diào)用的。而標(biāo)簽庫(Tag Library)就是客戶化標(biāo)簽的集合。 JSP標(biāo)簽庫是一種通過JavaBeans生成基于XML的腳本的方法。它是JSP的最大特點(diǎn)之一。通過標(biāo)簽庫,能夠無限制地?cái)U(kuò)展JSP應(yīng)用,完成任何復(fù)雜的應(yīng)用需求。 JSP標(biāo)簽庫具有以
75、下特點(diǎn) </p><p> 易于使用:JSP中的標(biāo)簽和一般的HTML標(biāo)記外表上是完全一樣的,使用起來和普通的HTML標(biāo)記一樣方便。 易于代碼重用:標(biāo)簽庫中的每一個(gè)標(biāo)簽都能完成一定的功能。一旦定義好了一個(gè)標(biāo)簽庫,只需要把這個(gè)標(biāo)簽庫包裝成一個(gè)Jar文件,那么以后只要在別的系統(tǒng)中使用這個(gè)標(biāo)簽庫就行了,而不用重新開發(fā)代碼,極大地提高了系統(tǒng)開發(fā)效率,降低了開發(fā)成本。 易于代碼維護(hù):所有的應(yīng)用邏輯都封裝
76、在標(biāo)簽處理器和JavaBeans中,所有的標(biāo)簽都集中在一個(gè)標(biāo)簽庫中。如果需要更新代碼或者需要修改一個(gè)網(wǎng)頁上的功能,只需要修改相應(yīng)的標(biāo)簽即可。通過這種統(tǒng)一維護(hù)方式,不用在每個(gè)網(wǎng)頁上去作修改,極大地減少了維護(hù)的工作量,節(jié)約了維護(hù)成本。 易于系統(tǒng)擴(kuò)充:如果需要向系統(tǒng)中添加新的功能,只需要定義一個(gè)新的標(biāo)簽來完成這一功能即可,無需對(duì)系統(tǒng)的其它方面作任何改動(dòng)。標(biāo)簽庫可以繼承JSP規(guī)范各方面的特性。這樣就可以無限制地?cái)U(kuò)展和增加JSP的功能,
77、而不需要等待下一版本JSP的出現(xiàn)。</p><p> 數(shù)據(jù)庫連接部分:本系統(tǒng)支持常用的幾個(gè)數(shù)據(jù)庫,包括Oracle、Sybase、MSSQLServer、MySQL和DB2,根據(jù)用戶選擇的數(shù)據(jù)庫類型和用戶提供的數(shù)據(jù)庫名稱、用戶名、密碼使用JDBC同數(shù)據(jù)庫相連。 系統(tǒng)基本表生成部分:和數(shù)據(jù)庫連接以后,根據(jù)同數(shù)據(jù)庫相連的用戶名生成兩個(gè)系統(tǒng)基本表TC-Tables和TC-Columns,TC-Tables表
78、包含在該數(shù)據(jù)庫中屬于該用戶的所有的表的英文名稱、中文名稱和一些屬性,如是否可修改、是否可查詢等;TC-Columns表包含在該數(shù)據(jù)庫中屬于該用戶的所有的表的所有列的中英文名稱和其它一些屬性。如是否可顯示、是否可查詢等。這兩個(gè)系統(tǒng)基本表在整個(gè)系統(tǒng)的開發(fā)過程中提供用戶所使用數(shù)據(jù)庫的基本信息。 </p><p> 模板選擇和網(wǎng)頁生成部分:該部分是系統(tǒng)的核心部分。它包含了兩個(gè)子模塊。 模板選擇部分:系統(tǒng)為用戶
79、提供模板選擇界面,讓用戶根據(jù)需要從模板庫中選擇所要使用的模板。 </p><p> 模板處理部分:根據(jù)用戶選擇的模板,系統(tǒng)調(diào)用指定的模板處理模塊對(duì)這個(gè)模板進(jìn)行處理。當(dāng)處理程序遇到模板中的標(biāo)簽時(shí),就為用戶提供交互界面,讓用戶為指定的標(biāo)簽輸入?yún)?shù),并由系統(tǒng)驗(yàn)證用戶輸入的標(biāo)簽的有效性。最后由系統(tǒng)完成JSP頁面的生成。 網(wǎng)頁預(yù)覽和修改部分:網(wǎng)頁生成出來以后,系統(tǒng)為用戶提供了一個(gè)網(wǎng)頁預(yù)覽窗口和代碼查看修改窗口。
80、通過這個(gè)預(yù)覽窗口,用戶可以預(yù)覽一下生成出來的JSP頁面的效果。如果用戶對(duì)頁面的靜態(tài)方面的效果不太滿意,用戶可以通過代碼查看修改窗口修改代碼中的HTML代碼。如果用戶對(duì)頁面的靜態(tài)效果有進(jìn)一步的要求,系統(tǒng)還為用戶提供了一個(gè)調(diào)用Dreamweaver編輯器的接口,用戶可以使用它來對(duì)生成出來的JSP頁面的靜態(tài)效果進(jìn)行進(jìn)一步的修改和完善。</p><p> 模板庫和標(biāo)簽庫的實(shí)現(xiàn) </p><p>
81、 標(biāo)簽庫的規(guī)劃和設(shè)計(jì)在整個(gè)系統(tǒng)設(shè)計(jì)中至關(guān)重要,它關(guān)系到了代碼重用的程度和系</p><p> 統(tǒng)運(yùn)行的效率。它的規(guī)劃應(yīng)該遵循以下原則。 </p><p> 在標(biāo)簽中應(yīng)該盡量少的包含靜態(tài)的HTML。對(duì)于一般用戶來說,標(biāo)簽是透明的。用戶不能夠查看和修改標(biāo)簽。如果在標(biāo)簽中包含了過多的靜態(tài)HT-ML語句,將影響用戶對(duì)頁面的靜態(tài)效果的修改和完善,限制標(biāo)簽的使用。 </p><
82、;p> 盡量提高代碼的重用度。在對(duì)JSP應(yīng)用進(jìn)行分類是盡量把公用的JSP應(yīng)用提取出來,形成標(biāo)簽。而不用在每個(gè)標(biāo)簽中都重復(fù)實(shí)現(xiàn)該應(yīng)用。這樣在以后要對(duì)該應(yīng)用進(jìn)行修改和完善時(shí),只需對(duì)這一個(gè)標(biāo)簽進(jìn)行修改即可,易于代碼的維護(hù)。 </p><p> 方便用戶的使用。在設(shè)計(jì)標(biāo)簽庫時(shí),應(yīng)該充分考慮到用戶的使用情況,使用戶能夠很容易和方便地理解和使用標(biāo)簽。 </p><p> 標(biāo)簽庫的定義:定義
83、一個(gè)標(biāo)簽庫,必須首先定義一個(gè)標(biāo)簽庫描述文件(TLD)。這是一個(gè)基于XML的腳本文件,在這個(gè)文件中定義了XML的版本、所使用的編碼、標(biāo)簽庫的版本、所使用的JSP的版本、標(biāo)簽庫的名稱和這個(gè)庫中所包含的所有的標(biāo)簽的定義和參數(shù)描述,包括標(biāo)簽的名稱,標(biāo)簽所對(duì)應(yīng)的Java類,標(biāo)簽的描述信息等。 </p><p> 標(biāo)簽的實(shí)現(xiàn):一個(gè)標(biāo)簽就是一個(gè)特殊的Java 類,這個(gè)類必須繼承TagSupport類,這個(gè)類是在javax.s
84、ervlet.jsp.tagext包中定義的。在標(biāo)簽類中,包含了這個(gè)標(biāo)簽的參數(shù)初始化方法(Set/Get)、標(biāo)簽的主體處理方法(Handler)以及供下一級(jí)標(biāo)簽調(diào)用的方法等。 </p><p> 模板的實(shí)現(xiàn):一個(gè)模板就是一個(gè)含有標(biāo)簽引用的JSP文件。為了在模板中引用所定義的標(biāo)簽,必須首先引入標(biāo)簽庫。 </p><p> 其中uri指定標(biāo)簽庫描述文件的路徑;prefix指定引用標(biāo)簽時(shí)所使
85、用的前綴。 </p><p> 在模板中引用指定的標(biāo)簽時(shí),使用引入標(biāo)簽庫時(shí)所指定的前綴,指定標(biāo)簽的名稱;為標(biāo)簽的參數(shù)賦值。 </p><p> 本系統(tǒng)主體程序開發(fā)使用的是Borland公司的JBuilder 6.0,模板開發(fā)使用是Microsoft公司的Front-Page2000,標(biāo)簽庫開發(fā)使用的是UltraEdit編輯器,JDK采用的是JDK1.4。系統(tǒng)測(cè)試環(huán)境是JRun3.0。
86、 </p><p> Java是未來開發(fā)語言的主流,而Java在Web上的主要應(yīng)用JSP也必將成為未來Web開發(fā)的主流技術(shù)。本系統(tǒng)采用了JSP的最大特點(diǎn)之一的標(biāo)簽庫,使一般的Web開發(fā)人員也能夠方便地使用JSP強(qiáng)大的動(dòng)態(tài)頁面功能,開發(fā)出技術(shù)先進(jìn)的JSP動(dòng)態(tài)Web頁面。由于本系統(tǒng)采用Java語言進(jìn)行開發(fā),所以可以在任何支持圖形化界面的操作系統(tǒng)下運(yùn)行,實(shí)現(xiàn)了完全的與平臺(tái)無關(guān)。本系統(tǒng)易于擴(kuò)充和完善。在以后可以考慮為
87、用戶提供接口,使用戶可以自己擴(kuò)充模板庫和標(biāo)簽庫,進(jìn)一步增強(qiáng)系統(tǒng)的功能。 </p><p><b> 參考文獻(xiàn): </b></p><p> [1]Cay S. Horstmann,Gary Cornell.Java 2核心技術(shù)(CoreJava 2)[M].北</p><p> 京:機(jī)械工業(yè)出版社. </p><p&g
88、t; ?。?]Bruce Eckel.Java編程思想(Thinking in Java)[M].北京:機(jī)械工業(yè)出</p><p><b> 版社. </b></p><p> [3]Joseph L.Weber.Java 2編程詳解(Using Java 2)[M].北京:電子工業(yè)</p><p><b> 出版社. <
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 眾賞文庫僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 基于jsp網(wǎng)頁自動(dòng)生成工具設(shè)計(jì)與實(shí)現(xiàn)
- 基于jsp網(wǎng)頁自動(dòng)生成工具的設(shè)計(jì)與實(shí)現(xiàn)
- 基于php技術(shù)的網(wǎng)頁自動(dòng)生成工具
- 基于PHP技術(shù)的網(wǎng)頁自動(dòng)生成工具.pdf
- 基于jsp的自動(dòng)排課系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)
- jsp網(wǎng)站生成工具課程設(shè)計(jì)
- 個(gè)性化教學(xué)設(shè)計(jì)自動(dòng)生成工具的設(shè)計(jì)與實(shí)現(xiàn).pdf
- asp.net網(wǎng)頁的生成【外文翻譯】
- 基于代碼生成技術(shù)的自動(dòng)化測(cè)試工具的設(shè)計(jì)與實(shí)現(xiàn).pdf
- 基于語義的網(wǎng)頁自動(dòng)摘要系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn).pdf
- 基于EDKII框架的固件生成工具設(shè)計(jì)與實(shí)現(xiàn).pdf
- 一種DSP自動(dòng)代碼生成工具的設(shè)計(jì)與實(shí)現(xiàn).pdf
- 基于XML模式的XML文檔自動(dòng)生成工具的研究與實(shí)現(xiàn).pdf
- 網(wǎng)頁設(shè)計(jì)外文翻譯
- SRAM Wrapper自動(dòng)生成工具開發(fā)與軟件實(shí)現(xiàn).pdf
- 網(wǎng)頁圖片無障礙替代文本自動(dòng)生成算法設(shè)計(jì)與實(shí)現(xiàn).pdf
- 畢業(yè)論文--基于jsp的圖書管理系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)(含外文翻譯)
- 網(wǎng)頁設(shè)計(jì)外文翻譯
- 基于jsp的辦公自動(dòng)化系統(tǒng)設(shè)計(jì)與實(shí)現(xiàn)
- 基于FreeMarker引擎的代碼生成工具的設(shè)計(jì)與實(shí)現(xiàn).pdf
評(píng)論
0/150
提交評(píng)論