2022-11-23 07:11

Produce the design of the tool and realize automatically
on the basis of JSP webpage

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 Web developers 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 of the tool and realizes automatically on the basis of JSP webpage of the template and label storehouse, put forward concrete design philosophy and implementation method .

With the popularization of WWW (World Wide Web ), the technology of the dynamic webpage is developed rapidly too. From original CGI (Common Gateway In-terface ) to ASP (Active Server Page ), have met the webpage developer to the demand for developing technology of the dynamic webpage to 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 application of the technology, have hindered their popularization greatly. The vast page developers all look forward to a kind of unified page and develop technology earnestly, characteristic that this technology there should be:①Have nothing to do with the operating platform, can run on any Web or the application program server ; ②Show the logic and page of application program that separates ; ③Offer codes to put in an position, simplify and develop the course based on interactive application program of Web.

JSP (Java Server Page ) technology is designed and used for responding to the request that like this. JSP is developed technology by the new webpage that Sun MicroSystem Company put out in June of 1999, 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 advancedly , safely and stepping dynamic websites of the platform .

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 with various kinds of Java technology together intactly , thus realize very complicated application.

As a kind of technology of development based on text , taking showing as centre, JSP has offered all 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 work that majority and websites 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 that logic separate lie in , upgrade person , page of appearance neednt understand Java code , the personnel upgrading Javas neednt be experts who design webpage either. This can define Web template in JSP page with Javas , in order to set up websites made up of a page with similar appearance. Java completion data offer, have Java code among template, this mean template these can write by one HTML person is it maintain to come.

JSP develops technology as the webpage of the mainstream at present, has the following characteristics:

(1) Separate the formulation and showing of the content : Using JSP technology, the page developer of Web can use 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 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 and JavaBeans, then other people, such as Web administrative staff and page designer encapsulation, can edit and use JSP page , and does not influence the formulation of the content .
(2) Emphasize the reusable 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, 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 course, the efficiency of improving the project and developing wholly greatly.

Though JSP is powerful, it requires the webpage developer should be quite familiar with Java. There are still relatively few Java programmers now, for general webpage developer, the grammar of JSP is more difficult to grasp . So, need a kind of webpage developing instrument and offer commonly used JSP application to general webpage developer, is it understand general page develop developer of technology (HTML ) can use strong function of JSP too only to let.

Systematic design object and main technology of use:

(1)Design object

System this design object for understand but HTML understand general webpage developer of JSP offer a webpage developing instrument at all only, enable them to follow the systematic file, use the daily function of JSP through the label, produce one finally and only include static HTML and dynamic JSP webpage of JSP label.

(2)Main technology

This system is in the design, consider using the technology of the template and JSP label to realize mainly.

1、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 advance , uses the family to choose the template from the template storehouse c




随着WWW(World Wide Web)的普及,动态网页技术也急速发展。从原来的CGI(Common Gateway In-terface)到ASP(Active Server Page),都从某种程度上满足了网页开发人员对动态网页开发技术的需求。但是不管是CGI还是ASP都存在一定的局限性,如CGI对服务器资源的耗费,ASP只能同Microsoft IIS一起使用等,这些都限制了这些技术的使用范围,极大地阻碍了它们的推广。广大的页面开发人员都热切地盼望一种统一的页面开发技术,该技术应该具有的特点:①与操作平台无关,能够在任何Web或应用程序服务器上运行;②将应用程序逻辑和页面显示分离;③提供代码重用,简化开发基于Web的交互式应用程序的过程。

JSP(Java Server Page)技术就是被设计用来满足这样的要求的。JSP是由Sun MicroSystem公司于1999年6月推出的新的网页开发技术,它是基于Java Serv-let以及整个Java体系的Web开发技术,是Servlet2.1API的扩展。利用这一技术,可以建立先进、安全和跨平台的动态网站。

Java是未来的主流开发技术,具有很多优势。JSP则是Java在Internet/Intranet Web上的重要应用技术,得到了广泛的支持和承认,它可以和各种Java技术完好地结合在一起,从而实现非常复杂的应用。

作为一种基于文本的、以显示为中心的开发技术,JSP提供了Java Servlet的所有好处。为了做到逻辑功能和显示功能分开,JSP已经可以和JavaBeans、Enterprise JavaBeans(EJB)和Servlet一起工作。JSP的开发人员可以通过使用JavaBeans、EJB和Servlet来完成大部分与网站逻辑相关的工作,而仅仅把显示的工作交给JSP页面来完成。内容和显示逻辑分开的好处在于,更新页面外观的人员不必懂得Java代码,而更新Java类的人员也不必是设计网页的行家。这就可以用带Java类的JSP页面来定义Web模板,以建立一个具有相似外观的页面组成的网站。Java类完成数据提供,在模板中就没有Java代码,这意味着这些模板可以由一个HTML编写人员来维护。













  在JSP中,动作是可以创造与访问程序语言对象和影响输出流的元素。JSP定义了六个标准的动作。除了这六个标准动作以外,用户可以定义自己的动作来完成特定的功能。这些动作被称为客户化动作,它们是可重用的程序模块。通过这些动作,程序员就可以在JSP页面中把页面的显示功能也部分地封装起来,使整个页面更加简洁和易于维护。在一个JSP页面中,这些客户化动作是通过客户化标签来调用的。而标签库(Tag Library)就是客户化标签的集合。




  ②标签的实现:一个标签就是一个特殊的Java 类,这个类必须继承TagSupport类,这个类是在javax.servlet.jsp.tagext包中定义的。在标签类中,包含了这个标签的参数初始化方法(Set/Get)、标签的主体处理方法(Handler)以及供下一级标签调用的方法等。
  本系统主体程序开发使用的是Borland公司的JBuilder 6.0,模板开发使用是Microsoft公司的Front-Page2000,标签库开发使用的是UltraEdit编辑器,JDK采用的是JDK1.4。系统测试环境是JRun3.0。



[1] Cay S.Horstmann,Gary Cornell.Java 2核心技术(CoreJava 2)[M].北京:机械工业出版社.

[2] Bruce Eckel.Java编程思想(Thinking in Java)[M].北京:机械工业出版社.

[3] Joseph L.Weber.Java 2编程详解(Using Java 2)[M].北京:电子工业出版社.

[4] Borland公司.Building Applications with JBuilder.



原文和译文剩余内容已隐藏,您需要先支付 20元 才能查看原文和译文全部内容!立即支付