CN102945287A - Java server page (JSP) data automatic paging java standard tag library (JSTL) label technology and application - Google Patents
Java server page (JSP) data automatic paging java standard tag library (JSTL) label technology and application Download PDFInfo
- Publication number
- CN102945287A CN102945287A CN2012104948362A CN201210494836A CN102945287A CN 102945287 A CN102945287 A CN 102945287A CN 2012104948362 A CN2012104948362 A CN 2012104948362A CN 201210494836 A CN201210494836 A CN 201210494836A CN 102945287 A CN102945287 A CN 102945287A
- Authority
- CN
- China
- Prior art keywords
- data
- jsp
- template
- jstl
- label
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Images
Landscapes
- Stored Programmes (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention relates to the java server page (JSP) data automatic paging java standard tag library (JSTL) label technology and application. Extensive markup language (XML) label is defined as: writing XML files according to the JSTL standard format, and writing corresponding JAVA processing classes. Template analysis engine includes: writing a JavaScript template analysis engine for specially analyzing template definition. A data rendering engine is used for analyzing data and emerging the data into a paging form. The Tag labeling technology of JSP is used in packaging of data paging and in a template interface analyzing processing process, wherein core files of the JSTL label of the paging are guided in by a front stage JSP page. Template definition is guided in by a front stage JSP. Developers write a data obtaining method, and data obtained from a database are required to be packaged into a javascript object nation (JSON) data aggregate format. The JSTL paging label analyzes the template definition to automatically generate a paging form. The JSTL label automatically transmits asynchronous javascript and XML (AJAX) requests to a WEB server and displays the returned data to the JSP page.
Description
Technical field
The present invention relates to a kind of data automatic paging technology of Java Web application software, relate in particular to a kind of JSP data automatic paging JSTL label technique.
Background technology
Along with the development of network technology, based on network WEB uses more and more extensive.And in conjunction with the form of paging, be that WEB uses the most frequently used a kind of representing, yet the program development personnel are in the displaying interface link of data form, need to consider the many factors such as color, composing, ranks layout, having expended too much is the time, and fruit of labour reusable not, causes the wasting of resources.
Summary of the invention
Technical matters to be solved: the invention provides a kind of JSP data automatic paging JSTL label technique for above problem, present technique can reduce front end JSP and represent writing the time of code, with the developer from loaded down with trivial details interface set type and the work of data page free, and only use template definition seldom can finish front end work.So that the developer only need be absorbed in the backend services logic, in the Java of Base on Web application system, improved greatly the development efficiency of foreground JSP paging form.
Technical scheme: to the invention provides a kind of JSP data automatic paging JSTL label technique in order overcoming the above problems, to it is characterized in that: comprise three modules, be respectively:
One, XML label definition:
The XML that writes according to the standard format of JSTL describes document, describes the various attributes that document comprises the JSTL label, comprises: the data page number, every page data number, data sum, the page number are total, and write corresponding JAVA and process class;
Two, template analytics engine:
Write JavaScript template analytics engine, be used for specially resolving template definition, template engine uses front end JavaScript script edit, HTML and JS code in can recognition template;
Three, data render engine:
Call the template definition of resolving in the template engine, and the data stuffing that will return from data query is to template, and is presented as paging form;
Use the Tag label technique of JSP, encapsulation of data paging, and the processing procedure of substrate interface parsing:
1) introduce JSP data automatic paging JSTL label in the web.xml file in the web project, introduce successfully after, the JSP page of front end can use this label technique;
The front end JSP page is introduced the core document " the core document content comprises nuclear JavaScript template and processes class and style sheet " of JSP data automatic paging JSTL label technique;
3) front end JSP introduces template definition, gauge outfit, the exhibition information item of definition data form in the template;
4) front end JSP introduces template analytics engine and data render engine file;
5) call JSP data automatic paging JSTL label, and give the data page number of label, every page data number, data sum, the total attribute assignment of the page number;
6) developer writes data capture method, and the data encapsulation that method requires to get access to from database is JSON data acquisition form;
7) JSP data automatic paging JSTL label Automatically invoked template analytics engine is resolved template definition, and calling data is played up
Engine generates paging form automatically, simultaneously the paging page number of generated data;
8) page loads and during page turning, JSP data automatic paging JSTL label sends AJAX from trend WEB server and asks,
And with the JSON formatted data of returning, again carry out the 7th) step, in the JSP page, represent new data.
Beneficial effect: the present invention has done a large amount of encapsulation with loaded down with trivial details front end displaying workload, only expose the configuration parameter of minority necessity to the developer, the work such as data and paging of playing up are all finished automatically by label inside, therefore can improve greatly developer's work efficiency.This JSTL tag configurations parameter is few, and configuration item all provides default configuration mostly, so the usefulness of being simple and easy to has also strengthened code readable.
Description of drawings
Fig. 1 is frame diagram of the present invention.
After the SP page was introduced template definition, JSP data automatic paging JSTL label technique sent the HTTP request to background service
, the data in the background service data query library storage
, and be the JSON form with the data data encapsulation
Feed back to JSP data automatic paging JSTL label technique
, last JSP data automatic paging JSTL label technique carries out data and plays up.
Embodiment
Below in conjunction with accompanying drawing embodiment the present invention is described in further details.
As shown in Figure 1, JSP data automatic paging JSTL label technique comprises three modules, is respectively:
One, XML label definition:
The XML that writes according to the standard format of JSTL describes document, describes the various attributes that document comprises the JSTL label, comprises: the data page number, every page data number, data sum, the page number are total, and write corresponding JAVA and process class.
Two, template analytics engine:
Write JavaScript template analytics engine, be used for specially resolving template definition, template engine uses front end JavaScript script edit, HTML and JS code in can recognition template.
Three, data render engine:
Call the template definition of resolving in the template engine, and the data stuffing that will return from data query is to template, and is presented as paging form.
Embodiment comprises following steps:
Use the Tag label technique of JSP, encapsulation of data paging, and the processing procedure of substrate interface parsing:
1) introduce JSP data automatic paging JSTL label in the web.xml file in the web project, introduce successfully after, the JSP page of front end can use this label technique;
2) " the core document content comprises the core document of front end JSP page introducing JSP data automatic paging JSTL label technique
Nuclear JavaScript template is processed class and style sheet ";
3) front end JSP introduces template definition, gauge outfit, the exhibition information item of definition data form in the template;
4) front end JSP introduces template analytics engine and data render engine file;
5) call JSP data automatic paging JSTL label, and give the data page number of label, every page data number, data sum, the total attribute assignment of the page number;
6) developer writes data capture method, and the data encapsulation that method requires to get access to from database is JSON data acquisition form;
7) JSP data automatic paging JSTL label Automatically invoked template analytics engine is resolved template definition, and calling data is played up
Engine generates paging form automatically, simultaneously the paging page number of generated data;
8) page loads and during page turning, JSP data automatic paging JSTL label sends AJAX from trend WEB server and asks
Ask, and with the JSON formatted data of returning, again carry out the 7th) step, in the JSP page, represent new data.
The above is the preferred embodiments of the present invention only, is not restricted to the present invention, and for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., all should be included within the claim scope of the present invention.
Claims (2)
1.JSP data automatic paging JSTL label technique is characterized in that: comprise three modules, be respectively:
One, XML label definition:
The XML that writes according to the standard format of JSTL describes document, describes the various attributes that document comprises the JSTL label, comprises: the data page number, every page data number, data sum, the page number are total, and write corresponding JAVA and process class;
Two, template analytics engine:
Write JavaScript template analytics engine, be used for specially resolving template definition, template engine uses front end JavaScript script edit, HTML and JS code in can recognition template;
Three, data render engine:
Call the template definition of resolving in the template engine, and the data stuffing that will return from data query is to template, and is presented as paging form.
2. the application of JSP data automatic paging JSTL label technique according to claim 1 is characterized in that: use the Tag label technique of JSP, encapsulation of data paging, and the processing procedure of substrate interface parsing:
1) introduce JSP data automatic paging JSTL label in the web.xml file in the web project, introduce successfully after, the JSP page of front end can use this label technique;
2) the front end JSP page is introduced the core document " the core document content comprises nuclear JavaScript template and processes class and style sheet " of JSP data automatic paging JSTL label technique;
3) front end JSP introduces template definition, gauge outfit, the exhibition information item of definition data form in the template;
4) front end JSP introduces template analytics engine and data render engine file;
5) call JSP data automatic paging JSTL label, and give the data page number of label, every page data number, data sum, the total attribute assignment of the page number;
6) developer writes data capture method, and the data encapsulation that method requires to get access to from database is JSON data acquisition form;
7) JSP data automatic paging JSTL label Automatically invoked template analytics engine is resolved template definition, and calling data is played up
Engine generates paging form automatically, simultaneously the paging page number of generated data;
8) page loads and during page turning, JSP data automatic paging JSTL label sends AJAX from trend WEB server and asks,
And with the JSON formatted data of returning, again carry out the 7th) step, in the JSP page, represent new data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210494836.2A CN102945287B (en) | 2012-11-29 | 2012-11-29 | JSP data automatic paging JSTL stamp methods |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210494836.2A CN102945287B (en) | 2012-11-29 | 2012-11-29 | JSP data automatic paging JSTL stamp methods |
Publications (2)
Publication Number | Publication Date |
---|---|
CN102945287A true CN102945287A (en) | 2013-02-27 |
CN102945287B CN102945287B (en) | 2015-09-09 |
Family
ID=47728231
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210494836.2A Active CN102945287B (en) | 2012-11-29 | 2012-11-29 | JSP data automatic paging JSTL stamp methods |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN102945287B (en) |
Cited By (15)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103605514A (en) * | 2013-11-11 | 2014-02-26 | 北京奇虎科技有限公司 | Front-end template processing method and device |
CN104331295A (en) * | 2014-11-05 | 2015-02-04 | 北京中科辅龙信息技术有限公司 | Page generation method and system |
CN105426172A (en) * | 2015-10-30 | 2016-03-23 | 北京金海明天软件技术有限公司 | XML analysis technique and template language based dynamic WEB page generation method |
CN105739969A (en) * | 2016-01-21 | 2016-07-06 | 南京南瑞集团公司 | Input tags-based application method of custom tags |
CN105824787A (en) * | 2016-03-15 | 2016-08-03 | 江苏中威科技软件系统有限公司 | Control method and system for dynamic configuration of HTML template |
CN107608734A (en) * | 2017-09-22 | 2018-01-19 | 深圳易嘉恩科技有限公司 | JavaScript rendering intents |
CN108304172A (en) * | 2017-01-13 | 2018-07-20 | 北京畅游天下网络技术有限公司 | A kind of web development approaches and web develop engine |
CN108446154A (en) * | 2018-02-24 | 2018-08-24 | 北京天元创新科技有限公司 | A kind of page turning tool bar generation method, application process and the system of JSP page |
CN109241494A (en) * | 2018-08-07 | 2019-01-18 | 平安科技(深圳)有限公司 | Page processing method, system, computer equipment and storage medium |
CN109710250A (en) * | 2018-11-15 | 2019-05-03 | 安徽同徽信息技术有限公司 | It is a kind of for constructing the visualization engine system and method for user interface |
CN110007906A (en) * | 2018-12-27 | 2019-07-12 | 阿里巴巴集团控股有限公司 | Processing method, device and the server of script file |
CN110263317A (en) * | 2019-06-27 | 2019-09-20 | 中国石油集团东方地球物理勘探有限责任公司 | A kind of method and device generating document template |
CN111460345A (en) * | 2020-03-30 | 2020-07-28 | 掌阅科技股份有限公司 | Electronic book loading display method, electronic equipment and storage medium |
CN111831942A (en) * | 2019-04-15 | 2020-10-27 | 阿里巴巴集团控股有限公司 | Method and device for displaying search results on page and electronic equipment |
CN113886728A (en) * | 2021-12-07 | 2022-01-04 | 中航金网(北京)电子商务有限公司 | Method and device for displaying table data |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040168124A1 (en) * | 2001-06-07 | 2004-08-26 | Michael Beisiegel | System and method of mapping between software objects & structured language element-based documents |
CN101546261A (en) * | 2008-10-10 | 2009-09-30 | 华中科技大学 | Secure web page tag library system supported by multiple strategies |
CN102184219A (en) * | 2011-05-06 | 2011-09-14 | 深圳市科陆电子科技股份有限公司 | Method for implementing custom date selection control based on Strusts2 in WEB system |
CN102262539A (en) * | 2011-07-29 | 2011-11-30 | 深圳市科陆电子科技股份有限公司 | Implementation method for self-defined paging dataTable control based on struts2 technology |
-
2012
- 2012-11-29 CN CN201210494836.2A patent/CN102945287B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20040168124A1 (en) * | 2001-06-07 | 2004-08-26 | Michael Beisiegel | System and method of mapping between software objects & structured language element-based documents |
CN101546261A (en) * | 2008-10-10 | 2009-09-30 | 华中科技大学 | Secure web page tag library system supported by multiple strategies |
CN102184219A (en) * | 2011-05-06 | 2011-09-14 | 深圳市科陆电子科技股份有限公司 | Method for implementing custom date selection control based on Strusts2 in WEB system |
CN102262539A (en) * | 2011-07-29 | 2011-11-30 | 深圳市科陆电子科技股份有限公司 | Implementation method for self-defined paging dataTable control based on struts2 technology |
Non-Patent Citations (1)
Title |
---|
刘军 等: "基于SpringMVC与iBATIS的轻量级Web应用研究", 《计算机应用》, vol. 26, no. 4, 30 April 2006 (2006-04-30), pages 840 - 843 * |
Cited By (23)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103605514B (en) * | 2013-11-11 | 2017-11-21 | 北京奇虎科技有限公司 | A kind of processing method and processing device of front-end template |
CN103605514A (en) * | 2013-11-11 | 2014-02-26 | 北京奇虎科技有限公司 | Front-end template processing method and device |
CN104331295A (en) * | 2014-11-05 | 2015-02-04 | 北京中科辅龙信息技术有限公司 | Page generation method and system |
CN105426172A (en) * | 2015-10-30 | 2016-03-23 | 北京金海明天软件技术有限公司 | XML analysis technique and template language based dynamic WEB page generation method |
CN105426172B (en) * | 2015-10-30 | 2019-06-14 | 北京金海明天软件技术有限公司 | Dynamic web pages generation method based on XML analytic technique and template instruction |
CN105739969B (en) * | 2016-01-21 | 2018-11-02 | 南京南瑞集团公司 | Application method based on the self-defined tag labels of input labels |
CN105739969A (en) * | 2016-01-21 | 2016-07-06 | 南京南瑞集团公司 | Input tags-based application method of custom tags |
CN105824787B (en) * | 2016-03-15 | 2018-03-02 | 江苏中威科技软件系统有限公司 | A kind of control method and system of html template dynamic configuration |
CN105824787A (en) * | 2016-03-15 | 2016-08-03 | 江苏中威科技软件系统有限公司 | Control method and system for dynamic configuration of HTML template |
CN108304172B (en) * | 2017-01-13 | 2021-10-08 | 北京畅游天下网络技术有限公司 | Web development method and web development engine |
CN108304172A (en) * | 2017-01-13 | 2018-07-20 | 北京畅游天下网络技术有限公司 | A kind of web development approaches and web develop engine |
CN107608734A (en) * | 2017-09-22 | 2018-01-19 | 深圳易嘉恩科技有限公司 | JavaScript rendering intents |
CN108446154A (en) * | 2018-02-24 | 2018-08-24 | 北京天元创新科技有限公司 | A kind of page turning tool bar generation method, application process and the system of JSP page |
CN109241494A (en) * | 2018-08-07 | 2019-01-18 | 平安科技(深圳)有限公司 | Page processing method, system, computer equipment and storage medium |
WO2020029383A1 (en) * | 2018-08-07 | 2020-02-13 | 平安科技(深圳)有限公司 | Pagination processing method and system, computer device and storage medium |
CN109710250A (en) * | 2018-11-15 | 2019-05-03 | 安徽同徽信息技术有限公司 | It is a kind of for constructing the visualization engine system and method for user interface |
CN109710250B (en) * | 2018-11-15 | 2022-05-31 | 安徽同徽信息技术有限公司 | Visualization engine system and method for constructing user interface |
CN110007906A (en) * | 2018-12-27 | 2019-07-12 | 阿里巴巴集团控股有限公司 | Processing method, device and the server of script file |
CN111831942A (en) * | 2019-04-15 | 2020-10-27 | 阿里巴巴集团控股有限公司 | Method and device for displaying search results on page and electronic equipment |
CN110263317A (en) * | 2019-06-27 | 2019-09-20 | 中国石油集团东方地球物理勘探有限责任公司 | A kind of method and device generating document template |
CN110263317B (en) * | 2019-06-27 | 2023-06-02 | 昆仑数智科技有限责任公司 | Method and device for generating document template |
CN111460345A (en) * | 2020-03-30 | 2020-07-28 | 掌阅科技股份有限公司 | Electronic book loading display method, electronic equipment and storage medium |
CN113886728A (en) * | 2021-12-07 | 2022-01-04 | 中航金网(北京)电子商务有限公司 | Method and device for displaying table data |
Also Published As
Publication number | Publication date |
---|---|
CN102945287B (en) | 2015-09-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN102945287A (en) | Java server page (JSP) data automatic paging java standard tag library (JSTL) label technology and application | |
CN111045655B (en) | Page rendering method and device, rendering server and storage medium | |
CN112632437B (en) | Webpage generation method and device and computer readable storage medium | |
CN108304172B (en) | Web development method and web development engine | |
CN113126990B (en) | Page development method, device, equipment and storage medium | |
CN110908712A (en) | Data processing method and equipment for cross-platform mobile terminal | |
CN103077185A (en) | Object-based user-defined information-expanding method | |
CN103389895A (en) | Method and system for generating front end page | |
CN107506190A (en) | XML file amending method and device based on Spring frameworks | |
CN108170409B (en) | Development method and system of WEB front-end control | |
CN112068911A (en) | Method, device, system, equipment and medium for generating electronic form | |
CN114416056A (en) | Page generation method, system, computer equipment and readable storage medium | |
CN114707474A (en) | Report generation method and device, electronic equipment and computer readable storage medium | |
CN112083926A (en) | Web user interface generation method and device | |
CN111752565A (en) | Interface generation method and device, computer equipment and readable storage medium | |
CN112084446A (en) | Webpage editing method, editor, electronic equipment and readable storage medium | |
CN113094039B (en) | Automatic code generation system based on database table | |
CN113887442A (en) | OCR training data generation method, device, equipment and medium | |
CN116909553A (en) | Page online development and local compiling operation system | |
CN115906261A (en) | Digital twin-based intelligent city componentization construction method and system | |
CN109582411A (en) | Graphical user interface creating method, device, computer equipment and storage medium | |
CN109857998A (en) | A kind of intelligence generates the method and device of EXCEL table | |
CN115061690A (en) | Automatic code generation method and device | |
US20130086491A1 (en) | Automatically generating a business process flow gui using a symbolic annotation language | |
CN114462374A (en) | Cross-system report generation method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C14 | Grant of patent or utility model | ||
GR01 | Patent grant |