CN111045705A - Method and system for automatically upgrading JSP (Java Server Page) page, server and medium - Google Patents

Method and system for automatically upgrading JSP (Java Server Page) page, server and medium Download PDF

Info

Publication number
CN111045705A
CN111045705A CN201911160715.2A CN201911160715A CN111045705A CN 111045705 A CN111045705 A CN 111045705A CN 201911160715 A CN201911160715 A CN 201911160715A CN 111045705 A CN111045705 A CN 111045705A
Authority
CN
China
Prior art keywords
upgrading
upgraded
jsp
tag
tags
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.)
Pending
Application number
CN201911160715.2A
Other languages
Chinese (zh)
Inventor
王琳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fangzheng Zhushi Wuhan Technology Development Co ltd
Original Assignee
Fangzheng Zhushi Wuhan Technology Development Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Fangzheng Zhushi Wuhan Technology Development Co ltd filed Critical Fangzheng Zhushi Wuhan Technology Development Co ltd
Priority to CN201911160715.2A priority Critical patent/CN111045705A/en
Publication of CN111045705A publication Critical patent/CN111045705A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a system for automatically upgrading JSP pages, a server and a medium, wherein the method sets upgrading conversion rules of each tag according to the attribute of each tag by setting upgrading tags in JSP files; then sequentially reading each line of information in the JSP page, searching whether a tag to be upgraded exists or not, and performing integration preprocessing on the searched tag to be upgraded, so that the page is preprocessed before the JSP page is upgraded, and noise in the JSP page is eliminated; and finally, matching corresponding rules of the tags to be upgraded, upgrading and transforming the tags to be upgraded according to the upgrading and transforming rules of the tags, avoiding complex manual operation and improving the development efficiency by an automatic upgrading mode.

Description

Method and system for automatically upgrading JSP (Java Server Page) page, server and medium
Technical Field
The invention relates to the technical field of network social contact, in particular to a method and a system for automatically upgrading a JSP (Java Server Page), a server and a medium.
Background
At present, for some J2EE projects, development time is relatively early, vulnerabilities of used WEB frameworks occur frequently, the frameworks need to be updated and updated urgently, and JSP pages need to be updated after the WEB frameworks are updated. The JSP is manually updated, developers do repetitive work, mistakes are easy to make, much time is needed for finding the reasons after the mistakes are made, and the efficiency is not high.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method and a system for automatically upgrading a JSP page, a server, and a medium, which can avoid tedious manual operation and improve development efficiency through an automatic upgrade method.
In a first aspect of the embodiments of the present invention, there is provided a method for automatically upgrading a JSP page, where the method for automatically upgrading a JSP page includes the following steps:
setting upgrading tags in the JSP file, and setting upgrading transformation rules of the tags according to the attributes of the tags;
sequentially reading each line of information in the JSP page, searching whether a tag to be upgraded exists or not, and performing integration preprocessing on the searched tag to be upgraded;
and matching the corresponding rules of the label to be upgraded, and upgrading and transforming the label to be upgraded according to the upgrading and transforming rules of the label.
In a second aspect of the embodiments of the present invention, there is provided a JSP page automatic upgrade system, where the JSP page automatic upgrade system includes the following functional modules:
the rule presetting module is configured to set upgrading tags in the JSP file and set upgrading transformation rules of the tags according to the attributes of the tags;
the tag integration module is configured to read each line of information in the JSP page in sequence, search whether a tag to be upgraded exists or not, and perform integration preprocessing on the searched tag to be upgraded;
and the tag upgrading module is configured to perform corresponding rule matching on the tag to be upgraded and perform upgrading transformation on the tag to be upgraded according to the upgrading transformation rule of the tag.
In a third aspect of the embodiments of the present invention, there is provided a server, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the above JSP page automatic upgrade method when executing the computer program.
In a fourth aspect of the embodiments of the present invention, a computer-readable storage medium is provided, where a computer program is stored, and when the computer program is executed by a processor, the steps of the JSP page automatic upgrade method are implemented.
According to the method, the system, the server and the medium for automatically upgrading the JSP, the upgrading conversion rules of all tags are set according to the attributes of all tags by setting the upgrading tags in the JSP file; then sequentially reading each line of information in the JSP page, searching whether a tag to be upgraded exists or not, and performing integration preprocessing on the searched tag to be upgraded, so that the page is preprocessed before the JSP page is upgraded, and noise in the JSP page is eliminated; and finally, matching corresponding rules of the tags to be upgraded, upgrading and transforming the tags to be upgraded according to the upgrading and transforming rules of the tags, avoiding complex manual operation and improving the development efficiency by an automatic upgrading mode.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flow chart of a JSP page automatic upgrade method provided by an embodiment of the present invention;
FIG. 2 is a block diagram of the flow of step S2 in FIG. 1;
fig. 3 is a functional block diagram of a JSP page automatic upgrade system according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a server according to an embodiment of the present invention.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is obvious that the embodiments described below are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As shown in fig. 1, an embodiment of the present invention provides a method for automatically upgrading a JSP page, where the method for automatically upgrading a JSP page includes the following steps:
and S1, setting upgrading tags in the JSP file, and setting upgrading transformation rules of the tags according to the attributes of the tags.
The invention takes the system upgrading from the Struts framework to Spring as an example, the label to be upgraded comprises html, file, html, radio, html, checkbox, bean, logic, and the like; these tags begin with beans, html, logic, where html: select and html: options are combination tags, and others are single tags.
When the system is upgraded to Spring from a Struts frame, the characteristic attributes of the tags in the Struts frame include name, property and the like, and the general attributes include id, value, size, style, maxlength and the like. And setting corresponding rules for the labels of the old frames according to the 3 attributes of the name, the property and the value and the attribute values thereof. The name attribute contains a default value, when the name attribute in the tag is not displayed, the value corresponding to the name attribute is the formId corresponding to the current JSP, and each JSP has a fixed formId.
And (3) setting the formId corresponding to the JSP file as formX, wherein the html-text tag transformation rule in the JSP is as follows:
the method ① transforms html text to input, ② adds attribute value, the value of which is a combination of the attribute name before transformation and the value of the attribute before transformation, if the attribute name before transformation is not displayed, the value of the attribute name is the default value FormX mentioned above, if the attribute name is displayed, the value of the attribute name is the value set by the attribute name before transformation, ③ deletes the attribute before transformation, ④ transforms the attribute to name, ⑤ keeps the other attributes unchanged, for example, the attribute before transformation is < html, textattribute "AAA" size ═ 8"/>, and the attribute after transformation is < inputname ═ AAA" size ═ 8 "/>.
Rule two, before transformation, the property and value are both displayed, the transformation method ① transforms html, text into input, ② before transformation, the property name is displayed, the property is deleted, ③ transforms the property into name, ④ other properties remain unchanged, for example, before transformation, html, text property "AAA" value1"/>, and after transformation, the value is" AAA "value 1"/>.
Let the formId corresponding to the JSP file be FormX, and the transformation rule of html: hidden tag in the JSP is as follows:
the rule is that attribute property before transformation is displayed, and attribute value is not displayed. ① transforms html, a value of property before transformation is "hidden", ② increases attribute value, a value of value is formed by combining attribute name before transformation and value of property, if the attribute name before transformation is not displayed, the value of attribute name is the default value FormX mentioned above, if the attribute name is displayed, the value of attribute name is the set value, ③ deletes the attribute before transformation, ④ transforms property into name, if the attribute name before transformation is ⑤ not contained, the attribute id is increased, the corresponding value is the value of attribute property before transformation, if the attribute id is contained, the attribute remains unchanged, ⑥ other attributes remain unchanged.
Rule two, before transformation, attributes property and value are displayed, a transformation method ① transforms html into hidden type and is "hidden", ② displays the attribute name before transformation, deletes the attribute, ③ transforms the property into name, ④ adds the attribute if the attribute id is not contained before transformation, the value of the attribute id is the value of the attribute property before transformation, if the attribute id is contained before transformation, the attribute remains unchanged, ⑤ keeps other attributes unchanged, for example, before transformation, hidden property is "AAA" value and is "value"/>, and after transformation, the attribute is "hidden" name and is "AAA" id is "AAA" value and is "AAA" value ".
For html: file tags, the transformation rule is unique, the transformation method ① transforms html: file into inputtype ═ file ", ② transforms property into name, and ③ other properties remain unchanged, for example, < html: file" size ═ 67"/> before transformation, and < input type ═ file" name ═ file "size ═ 67"/>, after transformation.
If the formal id corresponding to the JSP file is FormX, the html: radio tag in the JSP is displayed, and the transformation rule is unique, the transformation method ① transforms html: radio into inputtypype ═ radio:, ② adds a statement for judging whether to be selected, obtains the values of the attributes name, property and value before transformation, if the attribute name before transformation is not displayed, the value of the attribute name is the default value FormX mentioned above, if the attribute name is displayed, the value of the attribute name is the set value, and if the attribute name is displayed, the corresponding judgment is < c: iflex ═ AAA, > < AAA > < code >1 >, the corresponding judgment is < AAA, > < AAA > < code >, and the corresponding judgment is < AAA, > < AAA > ④, > < AAA > 21, >, the AAA < AAA > is not transformed, and the corresponding judgment is not deleted, > < AAA > AAA < 35, > < code > < AAA > AAA < 35.
Assuming that the formId corresponding to the JSP file is FormX, a transformation rule of an html: checkbox tag in the JSP is unique, and similar to a rule of an html: radio tag, the transformation method ① transforms html: checkbox into inputtypex ═ checkbox; (②③④) is consistent with the transformation method ②③④ of html: radio, for example, the value before transformation is < html: checkbox property ═ AAA ═ value: "1"/>, and after transformation is < inputtypex: "checkbox" name: "AAA" value1"< c: interrupt:" $, "({ FormX. AAA ═ value1}" -cked ═ c:/>.
Let the formId corresponding to the JSP file be FormX, and the transformation rule of bean: write tag in the JSP is as follows:
according to the rule I, before transformation, attribute property display is performed, a transformation method ① transforms bean, write into c, out, ② adds attribute value, the value of which is formed by combining the values of attribute name and property before transformation, if the attribute name before transformation is not displayed, the value of attribute name is the default value FormX mentioned above, if the attribute name is displayed, the value of attribute name is the set value, ③ before transformation, the attribute name is displayed, the attribute is deleted, the attribute property is deleted, ④ before transformation, if the attribute filter is displayed, the filter is transformed into escapeXml, for example, before transformation, the attribute is < bean, write, attribute, AAA, filter, attribute, etc. >, and after transformation, the attribute is < c: tvalue, $ { FormY.
Rule two, before transformation, property is not displayed, name is displayed, the transformation method ① transforms bean: write into c: out, ② adds property value, the value of which is the value of the property name before transformation, ③ deletes the property name, ④ transforms the filter into escapeXml if the property filter is displayed before transformation, for example, before transformation, the property is < bean: write ═ BBB 'filter ═ false'/>, and after transformation, the property is < c: outvalue ═ BBB 'escapeXml ═ false'/>.
For the bean label, the attributes id, name and property before transformation all show that the transformation rule is unique, the transformation method ① transforms the bean into c: set, ② adds the attribute value, the value of the value is formed by the combination of the values of the attributes name and property before transformation, ③ transforms the id into var, and ④ deletes the attributes name and property, for example, the attribute before transformation is < bean: defined ═ AAA "name ═ BBB" property ═ CCC "/>, and the attribute after transformation is < c: setvar ═ AAA" value "$ { bbb.ccc }/>".
For the local: equivalent label, the attributes value, name and property before transformation all show that the transformation rule is unique, the transformation method ① transforms the local: equivalent into c: if, ② adds a judgment statement, when the value of the attribute name is FormY, the value of the attribute property is AAA, and the value of the attribute property is value1, the judgment statement is test $ { FormY. AAA ═ value1' }, (+) ③ deletes the attributes value, name and property, for example, (< logic: equivalent name ═ FormY "property ═ AAA" value ═ value1' >, before transformation, and < c: iftest $ { FormY. AAA ═ 1' } after transformation.
The labels are notEqual, logic, empty, logic, notEmpty, logic, present and logic, notPresent, the conversion method is the same as the conversion method ①, the labels are converted into c, if, judgment sentences are added ②, the judgment sentences are set according to the meanings represented by the labels, ③ deletes the attributes of name and property, etc.
Let the formId corresponding to the JSP file be FormX, and the transformation rule of logic: iterate in the JSP is as follows:
according to the rule I, before the transformation, the property is not displayed, the property id and the name are displayed, the transformation method ① transforms logic, namely, attribute into c, forEach, ② transforms the property id into var, ③ adds the property items, wherein the value of the items is the value of the property name before the transformation, ④ deletes the property name, for example, the property name before the transformation is < logic, namely, attribute id is 'xxx', name is 'yyy', and the property name after the transformation is < c, forEachvar is 'xxx', items is 'yyy'.
Rule two, before transformation, the property, id and name are all displayed, the transformation method ① transforms logic: update into c: forEach, ② transforms property id into var, ③ adds property items, the value of which is formed by combining the property name and property before transformation, ④ deletes property name and property, for example, before transformation, the property name and property is < logic: update ═ xForm ═ property ═ yList ═ id ═ zMap >, and after transformation, the property name and property is < c: update $ { xForm.
For example, for a combined label, when html, select and html, options in JSP are in adjacent upper and lower rows, the information of the 2 rows is read, and if the html, select and html, options in JSP are in the same row, the transformation method ① extracts the value of attribute property of html, select, ② transforms the property in html, select, and ③ transforms html, options label, before transformation, the value of attribute property of < ml, attribute property [ < sap > > < BBB > > "label property ═ List (CCC) >"/> ", where drop is a Map object, the value of the stored key is stored in the Map List, and the value of the stored key, and the value of the corresponding bbid, [ < update > update, < update > update
</c:forEach>。
S2, sequentially reading each line of information in the JSP, searching whether a tag to be upgraded exists or not, and performing integration preprocessing on the searched tag to be upgraded.
As shown in fig. 2, it specifically includes the following sub-steps:
s21, sequentially reading each line of information in the JSP page, and searching whether the current line contains a tag to be upgraded;
s22, positioning the character position of the label to be upgraded on the line;
s23, searching the character string from the character position of the current line to the end of the line, and merging the current line and the next line if the character string does not contain the label end symbol, or the start symbol and the end symbol in the character string are not paired, i.e. representing that the line is changed in the middle of the label.
Specifically, a JSP file is obtained, each line in the JSP file is read in sequence, if the current line contains a tag to be upgraded, for example, if the current line has an html (hypertext tag), the character position of the current line is located according to a tag header < html, the character position of the current line is located, the current line is considered as a character string str1 from the character position of the current line to the end of the line, and if the character string str1 does not contain a tag end symbol >, or < sum > in str1 is not paired and represents that the tag is changed in the midway, the current line and the next line are merged.
While the two tags, html: select and html: options, in the combined tag need to consider the row distance of the tag (i.e. the difference between the row numbers of the two tags), and the other tags do not need to consider the row distance of the tag. In the process of executing preprocessing, if the line distance of html: select tags and html: options tags is greater than 1, integrating multiple lines of information into one line. I.e. html: select and html: options tags can only be on the same line or on adjacent upper and lower lines. The line distance of the labels is greater than 1, so that the labels are integrated into a line, and can be matched with a rule base more conveniently. The line distance of html: select and html: options tags is 0 or 1, and the current rule base can be matched accurately. When the line distance of html: select and html: options tags is greater than 1, matching errors are easily caused, and if matching is required to be correct, the complexity of a rule base needs to be increased.
And S3, performing corresponding rule matching on the label to be upgraded, and performing upgrading transformation on the label to be upgraded according to the upgrading transformation rule of the label.
For example, if the current line contains an html text label, the character position of the current line is located according to the html text, the character position is marked as index1, the character position of the line corresponding to the end symbol > of the html text is marked as index2, and the character string of the current line from index1 to index2 is the whole content of the html text label and is marked as character string str. Matching corresponding rules (html, text rule I and rule II, attribute value in rule I is not, attribute value in rule II is), converting the character string str according to the corresponding rules, marking the character string formed after the character string str is converted as strConvert, and replacing the original character string str with strConvert.
When a plurality of labels to be upgraded exist in a row, upgrading transformation is sequentially carried out according to the sequence from front to back, namely after the first label to be upgraded is processed and executed, whether the row still contains the labels to be upgraded is judged, if not, the next row is processed, and if so, the upgrading transformation is sequentially carried out.
According to the automatic JSP updating method provided by the invention, the updating conversion rule of each tag is set according to the attribute of each tag by setting the updating tag in the JSP file; then sequentially reading each line of information in the JSP page, searching whether a tag to be upgraded exists or not, and performing integration preprocessing on the searched tag to be upgraded, so that the page is preprocessed before the JSP page is upgraded, and noise in the JSP page is eliminated; and finally, matching corresponding rules of the tags to be upgraded, upgrading and transforming the tags to be upgraded according to the upgrading and transforming rules of the tags, avoiding complex manual operation and improving the development efficiency by an automatic upgrading mode.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
The above mainly describes a method for automatically upgrading a JSP page, and a JSP page automatic upgrading system will be described in detail below.
Fig. 3 shows a functional module block diagram of a JSP page automatic upgrade system provided by an embodiment of the present invention. As shown in fig. 3, the JSP page automatic upgrade system includes the following functional modules:
the rule presetting module 10 is configured to set upgrade tags in the JSP file, and set upgrade transformation rules of the tags according to attributes of the tags;
the tag integration module 20 is configured to read each line of information in the JSP page in sequence, search whether a tag to be upgraded exists, and perform integration preprocessing on the searched tag to be upgraded;
the tag upgrading module 30 is configured to perform corresponding rule matching on the tag to be upgraded, and perform upgrading transformation on the tag to be upgraded according to the upgrading transformation rule of the tag.
Fig. 4 is a schematic diagram of a server structure for automatically upgrading a JSP page according to an embodiment of the present invention. The server is a device for providing computing services, and generally refers to a computer with high computing power, which is provided to a plurality of users through a network. As shown in fig. 4, the server 4 of this embodiment includes: a memory 41, a processor 42, and a system bus 43, the memory 41 including an executable program 411 stored thereon, it being understood by those skilled in the art that the terminal device configuration shown in fig. 4 does not constitute a limitation of the terminal device, and may include more or fewer components than shown, or some components in combination, or a different arrangement of components.
The following specifically describes each constituent component of the terminal device with reference to fig. 4:
the memory 41 may be used to store software programs and modules, and the processor 42 executes various functional applications and data processing of the terminal by operating the software programs and modules stored in the memory 41. The memory 41 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the terminal, etc. Further, the memory 41 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
An executable program 411 of the JSP page automatic upgrade method is contained on the memory 41, the executable program 411 may be divided into one or more modules/units, the one or more modules/units are stored in the memory 41 and executed by the processor 42 to complete the transmission of the notification and obtain the notification implementation process, and the one or more modules/units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used for describing the execution process of the computer program 411 in the server 4. For example, the computer program 411 may be divided into an acquisition module, a comparison module, a concatenation module and a sending module.
The processor 42 is a control center of the server, connects various parts of the entire terminal device with various interfaces and lines, performs various functions of the terminal and processes data by running or executing software programs and/or modules stored in the memory 41 and calling data stored in the memory 41, thereby monitoring the terminal as a whole. Alternatively, processor 42 may include one or more processing units; preferably, the processor 42 may integrate an application processor, which primarily handles operating systems, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 42.
The system bus 43 is used to connect functional units inside the computer, and can transmit data information, address information, and control information, and may be, for example, a PCI bus, an ISA bus, a VESA bus, or the like. The instructions of the processor 42 are transmitted to the memory 41 through the bus, the memory 41 feeds back data to the processor 42, and the system bus 43 is responsible for data and instruction interaction between the processor 42 and the memory 41. Of course, the system bus 43 may also access other devices such as network interfaces, display devices, etc.
The server at least includes a CPU, a chipset, a memory, a disk system, and the like, and other components are not described herein again.
In the embodiment of the present invention, the executable program executed by the processor 42 included in the terminal specifically includes: a JSP page automatic upgrading method comprises the following steps:
setting upgrading tags in the JSP file, and setting upgrading transformation rules of the tags according to the attributes of the tags;
sequentially reading each line of information in the JSP page, searching whether a tag to be upgraded exists or not, and performing integration preprocessing on the searched tag to be upgraded;
and matching the corresponding rules of the label to be upgraded, and upgrading and transforming the label to be upgraded according to the upgrading and transforming rules of the label.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art would appreciate that the modules, elements, and/or method steps of the various embodiments described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (9)

1. A JSP page automatic upgrading method is characterized by comprising the following contents:
setting upgrading tags in the JSP file, and setting upgrading transformation rules of the tags according to the attributes of the tags;
sequentially reading each line of information in the JSP page, searching whether a tag to be upgraded exists or not, and performing integration preprocessing on the searched tag to be upgraded;
and matching the corresponding rules of the label to be upgraded, and upgrading and transforming the label to be upgraded according to the upgrading and transforming rules of the label.
2. The automatic JSP page upgrading method according to claim 1, wherein the tags to be upgraded are tags with tag heads of < html:, < bean:, < logic:.
3. The method for automatically upgrading a JSP (Java Server Page) according to claim 1, wherein the method for sequentially reading each line of information in the JSP, searching whether a tag to be upgraded exists, and performing integration preprocessing on the searched tag to be upgraded specifically comprises the following steps:
sequentially reading information of each line in the JSP page, and searching whether the current line contains a tag to be upgraded;
positioning the character position of the label to be upgraded on the line;
and searching a character string from the character position of the current line to the end of the line, and merging the current line and the next line if the character string does not contain a label end symbol or a start symbol and an end symbol in the character string are not paired, namely representing that the label is changed in the middle of the line.
4. The method for automatically upgrading the JSP (Java Server Page) according to claim 1, wherein for the combined tag in the JSP file, in the process of preprocessing execution, if the row distance of the combined tag is greater than 1, the multiple rows of information are integrated into one row.
5. The method for automatically upgrading the JSP (Java Server Page) according to claim 1, wherein when a plurality of tags to be upgraded exist in a row, the tags are sequentially upgraded from front to back.
6. The JSP automatic upgrading method of claim 1 is characterized in that the tags to be upgraded include html text, html hidden, html file, html radio, html checkbox, bean write, bean define, logic equal, logic present, logic equal, zero, html equal, zero.
7. The automatic JSP page upgrading system is characterized by comprising the following functional modules:
the rule presetting module is configured to set upgrading tags in the JSP file and set upgrading transformation rules of the tags according to the attributes of the tags;
the tag integration module is configured to read each line of information in the JSP page in sequence, search whether a tag to be upgraded exists or not, and perform integration preprocessing on the searched tag to be upgraded;
and the tag upgrading module is configured to perform corresponding rule matching on the tag to be upgraded and perform upgrading transformation on the tag to be upgraded according to the upgrading transformation rule of the tag.
8. A server comprising a memory, a processor and a computer program stored in said memory and executable on said processor, wherein said processor when executing said computer program implements the steps of a method for automatically upgrading a JSP page as claimed in any one of claims 1 to 7.
9. A computer readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the steps of the method for automatically upgrading a JSP page as claimed in any one of claims 1 to 7.
CN201911160715.2A 2019-11-23 2019-11-23 Method and system for automatically upgrading JSP (Java Server Page) page, server and medium Pending CN111045705A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911160715.2A CN111045705A (en) 2019-11-23 2019-11-23 Method and system for automatically upgrading JSP (Java Server Page) page, server and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911160715.2A CN111045705A (en) 2019-11-23 2019-11-23 Method and system for automatically upgrading JSP (Java Server Page) page, server and medium

Publications (1)

Publication Number Publication Date
CN111045705A true CN111045705A (en) 2020-04-21

Family

ID=70233248

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911160715.2A Pending CN111045705A (en) 2019-11-23 2019-11-23 Method and system for automatically upgrading JSP (Java Server Page) page, server and medium

Country Status (1)

Country Link
CN (1) CN111045705A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030226107A1 (en) * 2002-05-31 2003-12-04 Sun Microsystems, Inc. JSP tag libraries and web services
US20080104025A1 (en) * 2006-10-31 2008-05-01 Gautam Dharamshi Method and system for efficient execution and rendering of client/server interactive applications
CN102163233A (en) * 2011-04-18 2011-08-24 北京神州数码思特奇信息技术股份有限公司 Method and system for converting webpage markup language format
CN102262684A (en) * 2011-08-30 2011-11-30 深圳市五巨科技有限公司 Method and device for generating webpage page of mobile terminal
CN104360848A (en) * 2014-10-29 2015-02-18 中国建设银行股份有限公司 Flex page converting method and device
CN105426172A (en) * 2015-10-30 2016-03-23 北京金海明天软件技术有限公司 XML analysis technique and template language based dynamic WEB page generation method
CN109495435A (en) * 2017-09-13 2019-03-19 北京国双科技有限公司 The firewall update method and device of server

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030226107A1 (en) * 2002-05-31 2003-12-04 Sun Microsystems, Inc. JSP tag libraries and web services
US20080104025A1 (en) * 2006-10-31 2008-05-01 Gautam Dharamshi Method and system for efficient execution and rendering of client/server interactive applications
CN102163233A (en) * 2011-04-18 2011-08-24 北京神州数码思特奇信息技术股份有限公司 Method and system for converting webpage markup language format
CN102262684A (en) * 2011-08-30 2011-11-30 深圳市五巨科技有限公司 Method and device for generating webpage page of mobile terminal
CN104360848A (en) * 2014-10-29 2015-02-18 中国建设银行股份有限公司 Flex page converting method and device
CN105426172A (en) * 2015-10-30 2016-03-23 北京金海明天软件技术有限公司 XML analysis technique and template language based dynamic WEB page generation method
CN109495435A (en) * 2017-09-13 2019-03-19 北京国双科技有限公司 The firewall update method and device of server

Similar Documents

Publication Publication Date Title
CN106033471B (en) A kind of method and apparatus handling list
CN108023918A (en) A kind of information on services acquisition methods, apparatus and system
EP4198773A1 (en) Image processing method and apparatus, and computer readable storage medium
JP4460620B2 (en) Information service providing method and server
CN107798001A (en) Web page processing method, device and equipment
CN110737853B (en) Multi-platform display static page data synchronization method and B2B system
CN109756368A (en) Detection method, device, computer readable storage medium and the terminal of unit exception change
CN108664546B (en) XML data structure conversion method and device
US20040205584A1 (en) System and method for template creation and execution
CN111639275A (en) Routing information processing method and device, electronic equipment and computer storage medium
CN110851136A (en) Data acquisition method and device, electronic equipment and storage medium
CN110275938B (en) Knowledge extraction method and system based on unstructured document
CN113050921A (en) Webpage conversion method, device, storage medium and computer equipment
CN104915404A (en) Method and device for accessing invalid website
CN108304118B (en) Screenshot method and device
CN111142871B (en) Front-end page development system, method, equipment and medium
CN115543324B (en) Method, device, equipment and medium for generating interactive interface
CN111045705A (en) Method and system for automatically upgrading JSP (Java Server Page) page, server and medium
CN110321506A (en) Webpage data loading method, device, computer equipment and storage medium
CN114116712A (en) Extended field processing method and device, electronic equipment and storage medium
CN113779362A (en) Data searching method and device
JP4803218B2 (en) Information output device and information output processing program
CN108614805B (en) Method and system for displaying color expression using QML, server and medium
CN111241435A (en) Method and device for loading picture elements
CN111475679A (en) HTM L document processing method, page display method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination