diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 5ff892cccd30..34986727f4ef 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2085,9 +2085,11 @@ jobs: - name: web.beans run: ant $OPTS -f enterprise/web.beans test -# Fails + Slow -# - name: web.core.syntax -# run: ant $OPTS -f enterprise/web.core.syntax test + - name: web.core + run: ant $OPTS -f enterprise/web.core test-unit + + - name: web.core.syntax + run: ant $OPTS -f enterprise/web.core.syntax test-unit # Fails + Slow # - name: web.debug diff --git a/.gitignore b/.gitignore index d20d1599df4e..50efd8725540 100644 --- a/.gitignore +++ b/.gitignore @@ -52,6 +52,7 @@ /platform/o.n.bootstrap/launcher/windows/nbproject/Package-*.bash /enterprise/web.jspparser/test/unit/data/emptyWebProject/lib/*.jar /enterprise/web.jspparser/test/unit/data/project2/lib/*.jar +/enterprise/web.jspparser/test/unit/data/project2_jakarta/lib/*.jar # Database logs derby.log diff --git a/enterprise/libs.elimpl/nbproject/project.xml b/enterprise/libs.elimpl/nbproject/project.xml index 8e7d509e9d76..6002f790c571 100644 --- a/enterprise/libs.elimpl/nbproject/project.xml +++ b/enterprise/libs.elimpl/nbproject/project.xml @@ -31,7 +31,7 @@ 1 - 1.1 + 1.62.0 diff --git a/enterprise/libs.jstl/external/binaries-list b/enterprise/libs.jstl/external/binaries-list index b4ae07933ec5..57466032edc0 100644 --- a/enterprise/libs.jstl/external/binaries-list +++ b/enterprise/libs.jstl/external/binaries-list @@ -15,4 +15,6 @@ # specific language governing permissions and limitations # under the License. 34A035507F0270F1C6B7722D728BD7B5A9BBAC4C jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:1.2.7 +3993114CD341AFA42B2C2841C88EF653FA7EF3EE jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:3.0.2 F5A092DE3B2B087C14CA4B8D6F2C77A1F6802828 org.glassfish.web:jakarta.servlet.jsp.jstl:1.2.6 +078909A1354585B2A7A2D3B4E348FCEFF8B6D180 org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.1 diff --git a/enterprise/libs.jstl/external/jakarta.servlet.jsp.jstl-1.2-license.txt b/enterprise/libs.jstl/external/jakarta.servlet.jsp.jstl-1.2-license.txt index 286fabbb0f82..423ec4bd7517 100644 --- a/enterprise/libs.jstl/external/jakarta.servlet.jsp.jstl-1.2-license.txt +++ b/enterprise/libs.jstl/external/jakarta.servlet.jsp.jstl-1.2-license.txt @@ -3,7 +3,7 @@ Version: 1.2 License: EPL-v20 Description: Jakarta Standard Tag Library Origin: Eclipse Foundation (https://projects.eclipse.org/projects/ee4j.jstl) -Files: jakarta.servlet.jsp.jstl-1.2.6.jar, jakarta.servlet.jsp.jstl-api-1.2.7.jar +Files: jakarta.servlet.jsp.jstl-1.2.6.jar, jakarta.servlet.jsp.jstl-api-1.2.7.jar, jakarta.servlet.jsp.jstl-3.0.1.jar, jakarta.servlet.jsp.jstl-api-3.0.2.jar Eclipse Public License - v 2.0 diff --git a/enterprise/libs.jstl/manifest.mf b/enterprise/libs.jstl/manifest.mf index 423a3cc59a9f..396887ac5014 100644 --- a/enterprise/libs.jstl/manifest.mf +++ b/enterprise/libs.jstl/manifest.mf @@ -1,7 +1,7 @@ Manifest-Version: 1.0 OpenIDE-Module: org.netbeans.libs.jstl/1 OpenIDE-Module-Localizing-Bundle: org/netbeans/libs/jstl/Bundle.properties -OpenIDE-Module-Implementation-Version: 123 +OpenIDE-Module-Implementation-Version: 124 OpenIDE-Module-Layer: org/netbeans/libs/jstl/layer.xml AutoUpdate-Show-In-Client: false diff --git a/enterprise/libs.jstl/nbproject/project.properties b/enterprise/libs.jstl/nbproject/project.properties index e53cd8c0cc80..3afc57f4a245 100644 --- a/enterprise/libs.jstl/nbproject/project.properties +++ b/enterprise/libs.jstl/nbproject/project.properties @@ -19,5 +19,7 @@ javac.compilerargs=-Xlint -Xlint:-serial javac.source=1.8 release.external/jakarta.servlet.jsp.jstl-api-1.2.7.jar=modules/ext/jstl-api.jar release.external/jakarta.servlet.jsp.jstl-1.2.6.jar=modules/ext/jstl-impl.jar +release.external/jakarta.servlet.jsp.jstl-api-3.0.2.jar=modules/ext/jstl-jakarta-api.jar +release.external/jakarta.servlet.jsp.jstl-3.0.1.jar=modules/ext/jstl-jakarta-impl.jar -spec.version.base=2.65.0 +spec.version.base=2.66.0 diff --git a/enterprise/libs.jstl/src/org/netbeans/libs/jstl/Bundle.properties b/enterprise/libs.jstl/src/org/netbeans/libs/jstl/Bundle.properties index 9f71531bf79d..47d3a7e7054e 100644 --- a/enterprise/libs.jstl/src/org/netbeans/libs/jstl/Bundle.properties +++ b/enterprise/libs.jstl/src/org/netbeans/libs/jstl/Bundle.properties @@ -16,10 +16,12 @@ # under the License. # module description -OpenIDE-Module-Name=Jakarta Standard Tag Library 1.2 (JSTL) +OpenIDE-Module-Name=Jakarta Standard Tag Library (JSTL) OpenIDE-Module-Display-Category=Web -OpenIDE-Module-Short-Description=Installs the Jakarta Standard Tag Library 1.2.7. -OpenIDE-Module-Long-Description=Installs the Jakarta Standard Tag Library 1.2.7. +OpenIDE-Module-Short-Description=Installs the Jakarta Standard Tag Library 1.2.7 and 3.0.2 +OpenIDE-Module-Long-Description=\ + Installs the Jakarta Standard Tag Library 1.2.7 and 3.0.2 # library display name jstl=JSTL 1.2.7 +jstl-jakarta=JSTL 3.0.2 diff --git a/enterprise/libs.jstl/src/org/netbeans/libs/jstl/jstl-jakarta.xml b/enterprise/libs.jstl/src/org/netbeans/libs/jstl/jstl-jakarta.xml new file mode 100644 index 000000000000..ee94584c844a --- /dev/null +++ b/enterprise/libs.jstl/src/org/netbeans/libs/jstl/jstl-jakarta.xml @@ -0,0 +1,46 @@ + + + + + jstl-jakarta + j2se + org/netbeans/libs/jstl/Bundle + + classpath + jar:nbinst://org.netbeans.libs.jstl/modules/ext/jstl-jakarta-impl.jar!/ + jar:nbinst://org.netbeans.libs.jstl/modules/ext/jstl-jakarta-api.jar!/ + + + javadoc + jar:nbinst://org.netbeans.modules.j2ee.platform/docs/javaee-doc-api.jar!/ + + + + + maven-dependencies + + jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:3.0.2:jar + org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.1:jar + + + + diff --git a/enterprise/libs.jstl/src/org/netbeans/libs/jstl/layer.xml b/enterprise/libs.jstl/src/org/netbeans/libs/jstl/layer.xml index 3ae5c116f326..7f8b92944701 100644 --- a/enterprise/libs.jstl/src/org/netbeans/libs/jstl/layer.xml +++ b/enterprise/libs.jstl/src/org/netbeans/libs/jstl/layer.xml @@ -29,6 +29,9 @@ + + + diff --git a/enterprise/servletjspapi/build.xml b/enterprise/servletjspapi/build.xml index 9601b113c334..644f176b6616 100755 --- a/enterprise/servletjspapi/build.xml +++ b/enterprise/servletjspapi/build.xml @@ -26,89 +26,178 @@ + - - - - - - - + + - - - - - - + + + + + + - - - - - - - - - + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/enterprise/servletjspapi/external/binaries-list b/enterprise/servletjspapi/external/binaries-list index 02af8ec4d631..2c9c767e6656 100755 --- a/enterprise/servletjspapi/external/binaries-list +++ b/enterprise/servletjspapi/external/binaries-list @@ -15,7 +15,10 @@ # specific language governing permissions and limitations # under the License. +A8DE3741B91BA7427306104979AB2F084E831438 jakarta.servlet.jsp:jakarta.servlet.jsp-api:4.0.0 +1169A246913FE3823782AF7943E7A103634867C5 jakarta.servlet:jakarta.servlet-api:6.1.0 +C7C4A2EB1E40E0FF45AB5E2E52BD77D8C7A75176 jakarta.el:jakarta.el-api:6.0.1 EE48550ECE1AF1E0D8BD4877DBC6DA5C29C5496B jakarta.servlet.jsp:jakarta.servlet.jsp-api:2.3.6 B8A1142E04838FE54194049C6E7A18DAE8F9B960 jakarta.servlet:jakarta.servlet-api:4.0.4 -230AA160D4A4BFEB6CF5D301B98E46BCCB713DE2 org.glassfish.main.appclient:gf-client-module:5.1.0 -F311AB94BB1D4380690A53D737226A6B879DD4F1 jakarta.el:jakarta.el-api:3.0.3 \ No newline at end of file +F311AB94BB1D4380690A53D737226A6B879DD4F1 jakarta.el:jakarta.el-api:3.0.3 +1E77F50E244682173C27F661287629ADB83FE2D2 org.glassfish.main.appclient:gf-client-module:7.0.25 \ No newline at end of file diff --git a/enterprise/servletjspapi/external/servlet-jsp-api-4.0_2.3-license.txt b/enterprise/servletjspapi/external/generated-servlet-jsp-api-6.1_3.0-license.txt similarity index 99% rename from enterprise/servletjspapi/external/servlet-jsp-api-4.0_2.3-license.txt rename to enterprise/servletjspapi/external/generated-servlet-jsp-api-6.1_3.0-license.txt index d4470dd98eeb..f0b1396074b8 100644 --- a/enterprise/servletjspapi/external/servlet-jsp-api-4.0_2.3-license.txt +++ b/enterprise/servletjspapi/external/generated-servlet-jsp-api-6.1_3.0-license.txt @@ -1,10 +1,9 @@ Name: Java API for Jakarta Servlets, Java API for Jakarta Server Pages License: EPL-v20 -Version: 4.0_2.3 +Version: 6.1_3.0 Type: generated Description: Java API for Jakarta Servlets, Java API for Jakarta Server Pages, Java API for Jakarta Expression Language Origin: Eclipse Foundation (https://projects.eclipse.org/projects/ee4j) -Files: gf-client-module-5.1.0.jar, jakarta.el-api-3.0.3.jar, jakarta.servlet-api-4.0.4.jar, jakarta.servlet.jsp-api-2.3.6.jar Eclipse Public License - v 2.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. diff --git a/enterprise/servletjspapi/external/servlet-jsp-api-6.1_3.0-license.txt b/enterprise/servletjspapi/external/servlet-jsp-api-6.1_3.0-license.txt new file mode 100644 index 000000000000..fce22be444d5 --- /dev/null +++ b/enterprise/servletjspapi/external/servlet-jsp-api-6.1_3.0-license.txt @@ -0,0 +1,94 @@ +Name: Java API for Jakarta Servlets, Java API for Jakarta Server Pages +License: EPL-v20 +Version: 6.1_3.0 +Type: generated +Description: Java API for Jakarta Servlets, Java API for Jakarta Server Pages, Java API for Jakarta Expression Language +Origin: Eclipse Foundation (https://projects.eclipse.org/projects/ee4j) +Files: gf-client-module-7.0.25.jar, jakarta.el-api-3.0.3.jar, jakarta.servlet-api-4.0.4.jar, jakarta.servlet.jsp-api-2.3.6.jar, jakarta.el-api-6.0.1.jar, jakarta.servlet-api-6.1.0.jar, jakarta.servlet.jsp-api-4.0.0.jar + +Eclipse Public License - v 2.0 +THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. + +1. Definitions +“Contribution” means: + +a) in the case of the initial Contributor, the initial content Distributed under this Agreement, and +b) in the case of each subsequent Contributor: +i) changes to the Program, and +ii) additions to the Program; where such changes and/or additions to the Program originate from and are Distributed by that particular Contributor. A Contribution “originates” from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include changes or additions to the Program that are not Modified Works. +“Contributor” means any person or entity that Distributes the Program. + +“Licensed Patents” mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program. + +“Program” means the Contributions Distributed in accordance with this Agreement. + +“Recipient” means anyone who receives the Program under this Agreement or any Secondary License (as applicable), including Contributors. + +“Derivative Works” shall mean any work, whether in Source Code or other form, that is based on (or derived from) the Program and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. + +“Modified Works” shall mean any work in Source Code or other form that results from an addition to, deletion from, or modification of the contents of the Program, including, for purposes of clarity any new file in Source Code form that contains any contents of the Program. Modified Works shall not include works that contain only declarations, interfaces, types, classes, structures, or files of the Program solely in each case in order to link to, bind by name, or subclass the Program or Modified Works thereof. + +“Distribute” means the acts of a) distributing or b) making available in any manner that enables the transfer of a copy. + +“Source Code” means the form of a Program preferred for making modifications, including but not limited to software source code, documentation source, and configuration files. + +“Secondary License” means either the GNU General Public License, Version 2.0, or any later versions of that license, including any exceptions or additional permissions as identified by the initial Contributor. + +2. Grant of Rights +a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, Distribute and sublicense the Contribution of such Contributor, if any, and such Derivative Works. + +b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in Source Code or other form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder. + +c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to Distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program. + +d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement. + +e) Notwithstanding the terms of any Secondary License, no Contributor makes additional grants to any Recipient (other than those set forth in this Agreement) as a result of such Recipient's receipt of the Program under the terms of a Secondary License (if permitted under the terms of Section 3). + +3. Requirements +3.1 If a Contributor Distributes the Program in any form, then: + +a) the Program must also be made available as Source Code, in accordance with section 3.2, and the Contributor must accompany the Program with a statement that the Source Code for the Program is available under this Agreement, and informs Recipients how to obtain it in a reasonable manner on or through a medium customarily used for software exchange; and + +b) the Contributor may Distribute the Program under a license different than this Agreement, provided that such license: + +i) effectively disclaims on behalf of all other Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose; +ii) effectively excludes on behalf of all other Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits; +iii) does not attempt to limit or alter the recipients' rights in the Source Code under section 3.2; and +iv) requires any subsequent distribution of the Program by any party to be under a license that satisfies the requirements of this section 3. +3.2 When the Program is Distributed as Source Code: + +a) it must be made available under this Agreement, or if the Program (i) is combined with other material in a separate file or files made available under a Secondary License, and (ii) the initial Contributor attached to the Source Code the notice described in Exhibit A of this Agreement, then the Program may be made available under the terms of such Secondary Licenses, and +b) a copy of this Agreement must be included with each copy of the Program. +3.3 Contributors may not remove or alter any copyright, patent, trademark, attribution notices, disclaimers of warranty, or limitations of liability (“notices”) contained within the Program from any copy of the Program which they Distribute, provided that Contributors may add their own appropriate notices. + +4. Commercial Distribution +Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor (“Commercial Contributor”) hereby agrees to defend and indemnify every other Contributor (“Indemnified Contributor”) against any losses, damages and costs (collectively “Losses”) arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense. + +For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages. + +5. No Warranty +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE PROGRAM IS PROVIDED ON AN “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement, including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations. + +6. Disclaimer of Liability +EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, AND TO THE EXTENT PERMITTED BY APPLICABLE LAW, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. General +If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. + +If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed. + +All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive. + +Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be Distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to Distribute the Program (including its Contributions) under the new version. + +Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved. Nothing in this Agreement is intended to be enforceable by any entity that is not a Contributor or Recipient. No third-party beneficiary rights are created under this Agreement. + +Exhibit A - Form of Secondary Licenses Notice +“This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: {name license(s), version(s), and exceptions or additional permissions here}.” + +Simply including a copy of this Agreement, including this Exhibit A is not sufficient to license the Source Code under Secondary Licenses. + +If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice. + +You may add additional accurate notices of copyright ownership. diff --git a/enterprise/servletjspapi/manifest.mf b/enterprise/servletjspapi/manifest.mf index 36c8425b4a26..1d7666270490 100644 --- a/enterprise/servletjspapi/manifest.mf +++ b/enterprise/servletjspapi/manifest.mf @@ -1,5 +1,5 @@ Manifest-Version: 1.0 OpenIDE-Module: org.netbeans.modules.servletjspapi/1 OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/servletjspapi/Bundle.properties -OpenIDE-Module-Implementation-Version: 25 +OpenIDE-Module-Implementation-Version: 26 diff --git a/enterprise/servletjspapi/nbproject/project.properties b/enterprise/servletjspapi/nbproject/project.properties index c656e4abfbd7..4134b2e9d2d0 100644 --- a/enterprise/servletjspapi/nbproject/project.properties +++ b/enterprise/servletjspapi/nbproject/project.properties @@ -17,8 +17,9 @@ is.autoload=true javac.compilerargs=-Xlint:unchecked -javac.source=1.8 -spec.version.base=1.61.0 +javac.release=17 +spec.version.base=1.62.0 release.external/generated-servlet-jsp-api-4.0_2.3.jar=modules/ext/servlet4.0-jsp2.3-api.jar -extra.module.files=modules/ext/servlet4.0-jsp2.3-api.jar +release.external/generated-servlet-jsp-api-6.1_3.0.jar=modules/ext/servlet-jsp-api-6.1_3.0.jar +extra.module.files=modules/ext/servlet4.0-jsp2.3-api.jar,modules/ext/servlet-jsp-api-6.1_3.0.jar diff --git a/enterprise/servletjspapi/nbproject/project.xml b/enterprise/servletjspapi/nbproject/project.xml index d9f5f563156b..940a285c0adf 100644 --- a/enterprise/servletjspapi/nbproject/project.xml +++ b/enterprise/servletjspapi/nbproject/project.xml @@ -26,6 +26,14 @@ org.netbeans.modules.servletjspapi + jakarta.el + jakarta.servlet + jakarta.servlet.annotation + jakarta.servlet.descriptor + jakarta.servlet.http + jakarta.servlet.jsp + jakarta.servlet.jsp.el + jakarta.servlet.jsp.tagext javax.el javax.servlet javax.servlet.annotation @@ -39,6 +47,10 @@ ext/servlet4.0-jsp2.3-api.jar external/generated-servlet-jsp-api-4.0_2.3.jar + + ext/servlet-jsp-api-6.1_3.0.jar + external/generated-servlet-jsp-api-6.1_3.0.jar + diff --git a/enterprise/servletjspapi/src/org/netbeans/modules/servletjspapi/Bundle.properties b/enterprise/servletjspapi/src/org/netbeans/modules/servletjspapi/Bundle.properties index bb25ca78215d..fba8184c56f2 100644 --- a/enterprise/servletjspapi/src/org/netbeans/modules/servletjspapi/Bundle.properties +++ b/enterprise/servletjspapi/src/org/netbeans/modules/servletjspapi/Bundle.properties @@ -17,6 +17,6 @@ OpenIDE-Module-Name=Servlet/JSP API OpenIDE-Module-Display-Category=Libraries -OpenIDE-Module-Short-Description=Servlet 4.0/JSP 2.3 API Library +OpenIDE-Module-Short-Description=Servlet 6.1/JSP 4.0 API Library OpenIDE-Module-Long-Description=\ - Servlet 4.0/JSP 2.3 API Library + Servlet 6.1/JSP 4.0 API Library diff --git a/enterprise/web.core.syntax/nbproject/project.properties b/enterprise/web.core.syntax/nbproject/project.properties index 024879f13d0e..3664f947da04 100644 --- a/enterprise/web.core.syntax/nbproject/project.properties +++ b/enterprise/web.core.syntax/nbproject/project.properties @@ -70,13 +70,14 @@ test-unit-sys-prop.jsp.parser.jars=\ ${servletjspapi.dir}/modules/ext/servlet4.0-jsp2.3-api.jar:\ ${o.apache.tools.ant.module.dir}/ant/lib/ant-launcher.jar +test-unit-sys-prop.jsp.parser.jars-jakarta=\ + ${o.apache.tools.ant.module.dir}/ant/lib/ant.jar:\ + ${web.jspparser.dir}/modules/ext/glassfish-jspparser-7.0.25.jar:\ + ${servletjspapi.dir}/modules/ext/jsp-parser-ext-jakarta.jar:\ + ${servletjspapi.dir}/modules/ext/servlet-jsp-api-6.1_3.0.jar:\ + ${o.apache.tools.ant.module.dir}/ant/lib/ant-launcher.jar + test-unit-sys-prop.web.project.jars=\ - ${web.jsf12.dir}/modules/ext/jsf-1_2/commons-beanutils.jar:\ - ${web.jsf12.dir}/modules/ext/jsf-1_2/commons-collections.jar:\ - ${web.jsf12.dir}/modules/ext/jsf-1_2/commons-digester.jar:\ - ${web.jsf12.dir}/modules/ext/jsf-1_2/commons-logging.jar:\ - ${web.jsf12.dir}/modules/ext/jsf-1_2/jsf-impl.jar:\ - ${web.jsf12.dir}/modules/ext/jsf-1_2/jsf-api.jar:\ ${servletjspapi.dir}/modules/ext/servlet4.0-jsp2.3-api.jar # Propagate path to test to workaround issue with missing xerces on JDK1.6 in CompletionTest diff --git a/enterprise/web.core.syntax/nbproject/project.xml b/enterprise/web.core.syntax/nbproject/project.xml index b183fa808bac..af066fff73c3 100644 --- a/enterprise/web.core.syntax/nbproject/project.xml +++ b/enterprise/web.core.syntax/nbproject/project.xml @@ -138,6 +138,14 @@ 1.0 + + org.netbeans.modules.editor.document + + + + 1.0 + + org.netbeans.modules.editor.errorstripe.api @@ -182,14 +190,6 @@ 2.0 - - org.netbeans.modules.editor.document - - - - 1.0 - - org.netbeans.modules.editor.mimelookup @@ -353,7 +353,7 @@ 1 - 1.0 + 1.62 @@ -394,7 +394,8 @@ - 3 + 4 + 4.0 @@ -479,7 +480,7 @@ - org.openide.util.ui + org.openide.util @@ -487,19 +488,19 @@ - org.openide.util + org.openide.util.lookup - 9.3 + 8.0 - org.openide.util.lookup + org.openide.util.ui - 8.0 + 9.3 diff --git a/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/JSPProcessor.java b/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/JSPProcessor.java index e300e1d64281..799b8b669b91 100644 --- a/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/JSPProcessor.java +++ b/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/JSPProcessor.java @@ -26,11 +26,6 @@ import java.util.concurrent.atomic.AtomicReference; import java.util.logging.Level; import java.util.logging.Logger; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.tagext.TagAttributeInfo; -import javax.servlet.jsp.tagext.TagData; -import javax.servlet.jsp.tagext.TagInfo; -import javax.servlet.jsp.tagext.VariableInfo; import javax.swing.text.BadLocationException; import javax.swing.text.Document; import org.netbeans.api.java.classpath.ClassPath; @@ -44,9 +39,11 @@ import org.netbeans.modules.web.jsps.parserapi.PageInfo; import org.openide.filesystems.FileObject; import org.netbeans.modules.web.jsps.parserapi.Node.Visitor; +import org.netbeans.modules.web.jsps.parserapi.TagAttributeInfo; +import org.netbeans.modules.web.jsps.parserapi.TagInfo; +import org.netbeans.modules.web.jsps.parserapi.VariableInfo; import org.openide.cookies.EditorCookie; import org.openide.loaders.DataObject; -import org.openide.util.Exceptions; /** * @@ -137,7 +134,6 @@ protected String createBeanVarDeclarations(List localBeans) { if (coloringData != null && coloringData.getPrefixMapper() != null) { Collection prefixes = coloringData.getPrefixMapper().keySet(); - TagData fooArg = new TagData((Object[][]) null); for (String prefix : prefixes) { List tags = syntaxSupport.getAllTags(prefix, false); //do not require fresh data - #146762 @@ -147,15 +143,12 @@ protected String createBeanVarDeclarations(List localBeans) { if (tag == null) { continue; } - VariableInfo vars[] = tag.getVariableInfo(fooArg); - - if (vars != null) { - for (VariableInfo var : vars) { - // Create Variable Definitions - if (var != null && var.getVarName() != null && var.getClassName() != null && var.getDeclare()) { - String varDeclaration = var.getClassName() + " " + var.getVarName() + ";\n"; - beanDeclarationsBuff.append(varDeclaration); - } + + for (VariableInfo var : tag.getRuntimeVariables()) { + // Create Variable Definitions + if (var != null && var.getVarName() != null && var.getClassName() != null && var.isDeclare()) { + String varDeclaration = var.getClassName() + " " + var.getVarName() + ";\n"; + beanDeclarationsBuff.append(varDeclaration); } } } @@ -213,7 +206,7 @@ protected void processIncludes(boolean onlyPrelude, final String path) { Visitor visitor = new Visitor() { @Override - public void visit(IncludeDirective includeDirective) throws JspException { + public void visit(IncludeDirective includeDirective) { String fileName = includeDirective.getAttributeValue("file"); if (path == null || path.equals(fileName)) { processIncludedFile(fileName, processedFiles); @@ -221,14 +214,10 @@ public void visit(IncludeDirective includeDirective) throws JspException { } }; - try { - JspParserAPI.ParseResult parseResult = getParserData().getParserResult(); + JspParserAPI.ParseResult parseResult = getParserData().getParserResult(); - if (parseResult != null && parseResult.getNodes() != null) { - parseResult.getNodes().visit(visitor); - } - } catch (JspException ex) { - Exceptions.printStackTrace(ex); + if (parseResult != null && parseResult.getNodes() != null) { + parseResult.getNodes().visit(visitor); } } } diff --git a/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/JspHyperlinkProvider.java b/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/JspHyperlinkProvider.java index ffc11645b494..f17567b42ac1 100644 --- a/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/JspHyperlinkProvider.java +++ b/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/JspHyperlinkProvider.java @@ -22,14 +22,11 @@ import java.io.IOException; import java.util.Collections; import java.util.List; +import java.util.Objects; import java.util.concurrent.Callable; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; -import java.util.logging.Logger; import javax.lang.model.element.TypeElement; -import javax.servlet.jsp.tagext.TagFileInfo; -import javax.servlet.jsp.tagext.TagInfo; -import javax.servlet.jsp.tagext.TagLibraryInfo; import javax.swing.text.BadLocationException; import javax.swing.text.Document; import javax.swing.text.JTextComponent; @@ -48,6 +45,9 @@ import org.netbeans.editor.BaseDocument; import org.netbeans.editor.Utilities; import org.netbeans.lib.editor.hyperlink.spi.HyperlinkProvider; +import org.netbeans.modules.web.jsps.parserapi.TagFileInfo; +import org.netbeans.modules.web.jsps.parserapi.TagInfo; +import org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo; import org.openide.awt.StatusDisplayer; import org.openide.cookies.EditCookie; import org.openide.filesystems.FileObject; diff --git a/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/JspSyntaxSupport.java b/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/JspSyntaxSupport.java index 384f2f173e9b..f565784f34a3 100644 --- a/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/JspSyntaxSupport.java +++ b/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/JspSyntaxSupport.java @@ -28,7 +28,6 @@ import javax.swing.text.Document; import javax.swing.text.EditorKit; import javax.swing.text.JTextComponent; -import javax.servlet.jsp.tagext.*; import org.netbeans.api.lexer.Language; import org.netbeans.api.lexer.TokenHierarchy; import org.netbeans.api.lexer.TokenSequence; @@ -53,6 +52,10 @@ import org.netbeans.editor.ext.java.JavaTokenContext; import org.netbeans.modules.editor.NbEditorUtilities; import org.netbeans.modules.html.editor.api.completion.HtmlCompletionItem; +import org.netbeans.modules.web.jsps.parserapi.TagAttributeInfo; +import org.netbeans.modules.web.jsps.parserapi.TagFileInfo; +import org.netbeans.modules.web.jsps.parserapi.TagInfo; +import org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo; import org.openide.filesystems.FileUtil; import org.openide.modules.InstalledFileLocator; import org.openide.text.CloneableEditorSupport; @@ -515,25 +518,25 @@ private TagInfo[] getAllTagInfos(TagLibraryInfo tagLibrary) { if (tagLibrary != null) { int tagInfosLength = 0; int tagAllInfosLength = 0; - TagInfo[] tagInfos = tagLibrary.getTags(); - TagFileInfo[] tagFileInfos = tagLibrary.getTagFiles(); + List tagInfos = tagLibrary.getTags(); + List tagFileInfos = tagLibrary.getTagFiles(); if (tagInfos != null) { // it can be null, when the jsp parser finished unexpectedly - tagInfosLength = tagInfos.length; + tagInfosLength = tagInfos.size(); tagAllInfosLength = tagInfosLength; } if (tagFileInfos != null) { // it can be null, when the jsp parser finished unexpectedly - tagAllInfosLength += tagFileInfos.length; + tagAllInfosLength += tagFileInfos.size(); } allTags = new TagInfo[tagAllInfosLength]; if (tagInfos != null) { - System.arraycopy(tagInfos, 0, allTags, 0, tagInfosLength); + System.arraycopy(tagInfos.toArray(), 0, allTags, 0, tagInfosLength); } if (tagFileInfos != null) { - for (int i = 0; i < tagFileInfos.length; i++) { - allTags[tagInfosLength + i] = tagFileInfos[i].getTagInfo(); + for (int i = 0; i < tagFileInfos.size(); i++) { + allTags[tagInfosLength + i] = tagFileInfos.get(i).getTagInfo(); } } } @@ -542,8 +545,8 @@ private TagInfo[] getAllTagInfos(TagLibraryInfo tagLibrary) { /** Returns a list of strings - tag names available for a particular prefix. */ - protected List getAllTags(String prefix, boolean requiresFresh) { - List items = new ArrayList(); + protected List getAllTags(String prefix, boolean requiresFresh) { + List items = new ArrayList<>(); // standard JSP tags (jsp:) initCompletionData(); @@ -567,9 +570,7 @@ protected List getAllTags(String prefix, boolean requiresFresh) { tags[i].getTagClassName(), tags[i].getBodyContent(), url + tags[i].getTagName() + ".html#tag-start-" + tags[i].getTagName() + "#tag-end-" + tags[i].getTagName(), info, - tags[i].getTagExtraInfo(), tags[i].getAttributes(), - tags[i].getDisplayName(), tags[i].getSmallIcon(), tags[i].getLargeIcon(), - tags[i].getTagVariableInfos(), tags[i].hasDynamicAttributes())); + tags[i].getAttributes())); } } else { items.addAll(Arrays.asList(tags)); @@ -590,8 +591,7 @@ protected List getAllTagAttributes(String prefix, String tag) { TagInfo[] stanTagDatas = getTagInfos(); for (int i=0; i attributes = tagInfo.getAttributes(); String url = (String)helpMap.get(tagInfo.getTagLibrary().getURI()); if (url != null && !url.equals("")){ - for (int i = 0; i < attributes.length; i++) { - items.add(new TagAttributeInfo(attributes[i].getName(), - attributes[i].isRequired(), - url + tagInfo.getTagName() + ".html#attribute-start-" + attributes[i].getName() - + "#attribute-end-" + attributes[i].getName(), - attributes[i].canBeRequestTime(), - attributes[i].isFragment())); + for (TagAttributeInfo attribute: attributes) { + items.add(new TagAttributeInfo(attribute.getName(), + attribute.isRequired(), + url + tagInfo.getTagName() + ".html#attribute-start-" + attribute.getName() + + "#attribute-end-" + attribute.getName(), + attribute.isCanBeRequestTime(), + attribute.isFragment())); } } else { - items.addAll(Arrays.asList(attributes)); + items.addAll(attributes); } } } @@ -661,8 +661,7 @@ protected List getAllDirectiveAttributes(String directive) { directiveData = directiveJspData; for (int i=0; i attributes = ti.getAttributes(); + for (TagAttributeInfo attribute: ti.getAttributes()) { output.append(" "); // NOI18N - output.append(attributes[k].getName()); + output.append(attribute.getName()); output.append("\n");// NOI18N } } else { diff --git a/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/completion/JspCompletionQuery.java b/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/completion/JspCompletionQuery.java index a33b26f8c721..af029d9b38c1 100644 --- a/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/completion/JspCompletionQuery.java +++ b/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/completion/JspCompletionQuery.java @@ -25,8 +25,6 @@ import java.util.*; import javax.swing.text.JTextComponent; import javax.swing.text.BadLocationException; -import javax.servlet.jsp.tagext.TagInfo; -import javax.servlet.jsp.tagext.TagAttributeInfo; import org.netbeans.api.jsp.lexer.JspTokenId; import org.netbeans.api.lexer.Token; import org.netbeans.api.lexer.TokenHierarchy; @@ -36,6 +34,8 @@ import org.netbeans.modules.web.core.syntax.deprecated.JspTagTokenContext; import org.netbeans.modules.web.core.syntax.*; import org.netbeans.modules.web.core.syntax.tld.TldLibrary; +import org.netbeans.modules.web.jsps.parserapi.TagAttributeInfo; +import org.netbeans.modules.web.jsps.parserapi.TagInfo; import org.netbeans.spi.editor.completion.CompletionItem; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; diff --git a/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/completion/api/JspCompletionItem.java b/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/completion/api/JspCompletionItem.java index 44c4ab9653d5..395afb4f317e 100644 --- a/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/completion/api/JspCompletionItem.java +++ b/enterprise/web.core.syntax/src/org/netbeans/modules/web/core/syntax/completion/api/JspCompletionItem.java @@ -27,10 +27,6 @@ import java.net.MalformedURLException; import java.net.URL; import java.util.Collection; -import javax.servlet.jsp.tagext.TagAttributeInfo; -import javax.servlet.jsp.tagext.TagInfo; -import javax.servlet.jsp.tagext.TagVariableInfo; -import javax.servlet.jsp.tagext.VariableInfo; import javax.swing.ImageIcon; import javax.swing.text.Caret; import org.netbeans.api.editor.completion.Completion; @@ -47,10 +43,15 @@ import java.awt.event.KeyEvent; import java.io.File; import java.io.IOException; +import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import javax.swing.text.BadLocationException; import javax.swing.text.JTextComponent; +import org.netbeans.modules.web.jsps.parserapi.Node; +import org.netbeans.modules.web.jsps.parserapi.TagAttributeInfo; +import org.netbeans.modules.web.jsps.parserapi.TagInfo; +import org.netbeans.modules.web.jsps.parserapi.TagVariableInfo; import org.netbeans.spi.editor.completion.support.AsyncCompletionTask; import org.netbeans.spi.editor.completion.support.CompletionUtilities; import org.netbeans.swing.plaf.LFCustoms; @@ -451,8 +452,8 @@ public boolean substituteText(JTextComponent c, int len) { boolean hasAttrs = true; if (tagInfo != null) { - TagAttributeInfo[] tAttrs = tagInfo.getAttributes(); - hasAttrs = (tAttrs != null) ? (tAttrs.length > 0) : true; + List tAttrs = tagInfo.getAttributes(); + hasAttrs = (tAttrs != null) ? (! tAttrs.isEmpty()) : true; } if (hasAttrs) { return substituteText(c, @@ -716,7 +717,7 @@ public String getHelp() { helpText.append("Required:"); //NOI18N helpText.append(tagAttributeInfo.isRequired()); //NOI18N helpText.append("Request-time:"); //NOI18N - helpText.append(tagAttributeInfo.canBeRequestTime()); //NOI18N + helpText.append(tagAttributeInfo.isCanBeRequestTime()); //NOI18N helpText.append("Fragment:"); //NOI18N helpText.append(tagAttributeInfo.isFragment()); //NOI18N helpText.append(""); //NOI18N @@ -895,16 +896,15 @@ private static String constructHelp(TagInfo tagInfo) { sb.append("\" ");// NOI18N sb.append("size=\"+2\">Attributes");// NOI18N - TagAttributeInfo[] attrs = tagInfo.getAttributes(); - if (attrs != null && attrs.length > 0) { + if(! tagInfo.getAttributes().isEmpty()) { sb.append("NameRequiredRequest-time");// NOI18N - for (int i = 0; i < attrs.length; i++) { + for (TagAttributeInfo tai: tagInfo.getAttributes()) { sb.append(""); // NOI18N - sb.append(attrs[i].getName()); + sb.append(tai.getName()); sb.append(""); // NOI18N - sb.append(attrs[i].isRequired()); + sb.append(tai.isRequired()); sb.append(""); // NOI18N - sb.append(attrs[i].canBeRequestTime()); + sb.append(tai.isCanBeRequestTime()); sb.append(""); // NOI18N } } else { @@ -918,39 +918,39 @@ private static String constructHelp(TagInfo tagInfo) { sb.append(hexColorCode(COLOR_HELP_HEADER_FG));// NOI18N sb.append("\" ");// NOI18N sb.append("size=\"+2\">Variables");// NOI18N - TagVariableInfo[] variables = tagInfo.getTagVariableInfos(); - if (variables != null && variables.length > 0) { + + if (! tagInfo.getVariables().isEmpty()) { sb.append("NameTypeDeclareScope");// NOI18N - for (int i = 0; i < variables.length; i++) { + for (TagVariableInfo tvi: tagInfo.getVariables()) { sb.append(""); // NOI18N - if (variables[i].getNameGiven() != null && !variables[i].getNameGiven().equals("")) {// NOI18N - sb.append(variables[i].getNameGiven()); + if (tvi.getNameGiven() != null && !tvi.getNameGiven().equals("")) {// NOI18N + sb.append(tvi.getNameGiven()); } else { - if (variables[i].getNameFromAttribute() != null && !variables[i].getNameFromAttribute().equals("")) // NOI18N + if (tvi.getNameFromAttribute() != null && !tvi.getNameFromAttribute().equals("")) // NOI18N { - sb.append("From attribute '").append(variables[i].getNameFromAttribute()).append("'"); + sb.append("From attribute '").append(tvi.getNameFromAttribute()).append("'"); }// NOI18N else { sb.append("Unknown"); } // NOI18N } sb.append(""); // NOI18N - if (variables[i].getClassName() == null || variables[i].getClassName().equals("")) { + if (tvi.getClassName() == null || tvi.getClassName().equals("")) { sb.append("java.lang.String"); }// NOI18N else { - sb.append(variables[i].getClassName()); + sb.append(tvi.getClassName()); } sb.append(""); // NOI18N sb.append(""); // NOI18N - sb.append(variables[i].getDeclare()); + sb.append(tvi.isDeclare()); sb.append(""); // NOI18N sb.append(""); // NOI18N - switch (variables[i].getScope()) { - case VariableInfo.AT_BEGIN: + switch (tvi.getScope()) { + case Node.CustomTag.AT_BEGIN: sb.append("AT_BEGIN"); break;// NOI18N - case VariableInfo.AT_END: + case Node.CustomTag.AT_END: sb.append("AT_END"); break;// NOI18N default: diff --git a/enterprise/web.core.syntax/test/unit/data/testfilesformatting/issue121102.jsp.formatted b/enterprise/web.core.syntax/test/unit/data/testfilesformatting/issue121102.jsp.formatted index 900afe1664fe..59be13afc6a9 100644 --- a/enterprise/web.core.syntax/test/unit/data/testfilesformatting/issue121102.jsp.formatted +++ b/enterprise/web.core.syntax/test/unit/data/testfilesformatting/issue121102.jsp.formatted @@ -1,3 +1,5 @@ diff --git a/enterprise/web.core.syntax/test/unit/src/org/netbeans/modules/web/core/syntax/completion/api/JspCompletionItemTest.java b/enterprise/web.core.syntax/test/unit/src/org/netbeans/modules/web/core/syntax/completion/api/JspCompletionItemTest.java index 8c31be15de01..122fa4b136d3 100644 --- a/enterprise/web.core.syntax/test/unit/src/org/netbeans/modules/web/core/syntax/completion/api/JspCompletionItemTest.java +++ b/enterprise/web.core.syntax/test/unit/src/org/netbeans/modules/web/core/syntax/completion/api/JspCompletionItemTest.java @@ -18,12 +18,23 @@ */ package org.netbeans.modules.web.core.syntax.completion.api; +import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; +import java.io.OutputStream; import java.lang.reflect.Method; import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardOpenOption; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; import org.netbeans.test.web.core.syntax.TestBase; +import org.openide.filesystems.FileObject; +import org.openide.filesystems.FileUtil; + +import static java.nio.charset.StandardCharsets.UTF_8; /** * @@ -35,13 +46,38 @@ public JspCompletionItemTest(String name) { super(name); } - public void testGetStreamForUrl() throws Exception { - /* What is this for? - URL url = new URL("http://java.sun.com/jsp/jstl/core"); - InputStream inputStreamForUrl = JspCompletionItem.getInputStreamForUrl(url); - assertNotNull(inputStreamForUrl); - */ + private static void createTestZip(File zipFile, String filePath, String content) throws IOException { + Path zipPath = zipFile.toPath(); + Files.createDirectories(zipPath.getParent()); + try(OutputStream os = Files.newOutputStream(zipPath, StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING); + ZipOutputStream zos = new ZipOutputStream(os, UTF_8)) { + zos.putNextEntry(new ZipEntry(filePath)); + zos.write(content.getBytes(UTF_8)); + zos.closeEntry(); + } + } + + @Override + protected void setUp() throws Exception { + super.setUp(); + createTestZip( + new File(getDataDir(), "testJarLibrary/file.zip"), + "file.txt", + "testFile" + ); + createTestZip( + new File(getDataDir(), "testJarLibrary/file space.zip"), + "file.txt", + "test file with spaces" + ); + createTestZip( + new File(getDataDir(), "testJarLibrary/file_space.zip"), + "file space.txt", + "test file with spaces" + ); + } + public void testGetStreamForUrl() throws Exception { URL url = new URL("jar:file:" + getTestFile("testJarLibrary/file.zip").getPath() + "!/file.txt"); InputStream inputStreamForUrl = JspCompletionItem.getInputStreamForUrl(url); assertNotNull(inputStreamForUrl); diff --git a/enterprise/web.core.syntax/test/unit/src/org/netbeans/test/web/core/syntax/SingleJspServletGenTest.java b/enterprise/web.core.syntax/test/unit/src/org/netbeans/test/web/core/syntax/SingleJspServletGenTest.java index 8ccaf20e4205..0450280e8077 100644 --- a/enterprise/web.core.syntax/test/unit/src/org/netbeans/test/web/core/syntax/SingleJspServletGenTest.java +++ b/enterprise/web.core.syntax/test/unit/src/org/netbeans/test/web/core/syntax/SingleJspServletGenTest.java @@ -172,7 +172,7 @@ private Snapshot createSnaphot(Document doc){ } private Map createClassPaths() throws Exception { - Map cps = new HashMap(); + Map cps = new HashMap<>(); ClassPath cp = createServletAPIClassPath(); cps.put(ClassPath.COMPILE, cp); return cps; diff --git a/enterprise/web.core.syntax/test/unit/src/org/netbeans/test/web/core/syntax/TestBase2.java b/enterprise/web.core.syntax/test/unit/src/org/netbeans/test/web/core/syntax/TestBase2.java index 5034285ed0c8..af6b98ea93d7 100644 --- a/enterprise/web.core.syntax/test/unit/src/org/netbeans/test/web/core/syntax/TestBase2.java +++ b/enterprise/web.core.syntax/test/unit/src/org/netbeans/test/web/core/syntax/TestBase2.java @@ -40,6 +40,7 @@ import org.netbeans.spi.project.support.ant.PropertyUtils; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; +import org.openide.util.Utilities; /** * Common ancestor for all test classes. @@ -72,18 +73,25 @@ protected BaseKit getEditorKit(String mimeType) { } public final void initParserJARs() throws MalformedURLException { - String path = System.getProperty("jsp.parser.jars"); + List list = getJARs("jsp.parser.jars"); + List listJakarta = getJARs("jsp.parser.jars-jakarta"); + + JspParserImpl.setParserJARs(list.toArray(new URL[0]), listJakarta.toArray(new URL[0])); + } + + public static List getJARs(String propertyName) throws MalformedURLException { + String path = System.getProperty(propertyName); String[] paths = PropertyUtils.tokenizePath(path); List list = new ArrayList<>(); for (int i = 0; i< paths.length; i++) { String token = paths[i]; File f = new File(token); if (!f.exists()) { - fail("cannot find file "+token); + throw new RuntimeException("cannot find file "+token); } - list.add(f.toURI().toURL()); + list.add(Utilities.toURI(f).toURL()); } - JspParserImpl.setParserJARs(list.toArray(new URL[0])); + return list; } public final ClassPath createServletAPIClassPath() throws MalformedURLException, IOException { @@ -93,12 +101,12 @@ public final ClassPath createServletAPIClassPath() throws MalformedURLException, public final ClassPath createClassPath(String property) throws MalformedURLException, IOException { - String path = System.getProperty("web.project.jars"); + String path = System.getProperty(property); if ( path == null ){ path = ""; } String[] st = PropertyUtils.tokenizePath(path); - List fos = new ArrayList(); + List fos = new ArrayList<>(); for (int i=0; i 1 - 1.2 + 1.62 @@ -325,8 +325,8 @@ - 3 - 3.19 + 4 + 4.0 @@ -446,7 +446,7 @@ - org.openide.util.ui + org.openide.util @@ -454,19 +454,19 @@ - org.openide.util + org.openide.util.lookup - 9.3 + 8.0 - org.openide.util.lookup + org.openide.util.ui - 8.0 + 9.3 diff --git a/enterprise/web.core/src/org/netbeans/modules/web/core/api/JspColoringData.java b/enterprise/web.core/src/org/netbeans/modules/web/core/api/JspColoringData.java index 150efed28caa..fc2263424cfd 100644 --- a/enterprise/web.core/src/org/netbeans/modules/web/core/api/JspColoringData.java +++ b/enterprise/web.core/src/org/netbeans/modules/web/core/api/JspColoringData.java @@ -24,7 +24,7 @@ import java.util.Map; import java.util.Iterator; -import javax.servlet.jsp.tagext.TagLibraryInfo; +import org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo; /** Holds data relevant to the JSP coloring for one JSP page. The main purposes * of this class are @@ -35,35 +35,40 @@ * @author Petr Jiricka */ public final class JspColoringData extends PropertyChangeSupport { - - /** An property whose change is fired every time the tag library - * information changes in such a way that recoloring of the document is required. + + /** An property whose change is fired every time the tag library + * information changes in such a way that recoloring of the document is required. */ public static final String PROP_COLORING_CHANGE = "coloringChange"; // NOI18N public static final String PROP_PARSING_SUCCESSFUL = "parsingSuccessful"; //NOI18N public static final String PROP_PARSING_IN_PROGRESS = "parsingInProgress"; //NOI18N - + /** Taglib id -> TagLibraryInfo */ private Map taglibs; - + /** Prefix -> Taglib id */ private Map prefixMapper; - + private boolean elIgnored = false; - + private boolean xmlSyntax = false; private boolean initialized = false; - - /** Creates a new instance of JspColoringData. */ + + /** + * Creates a new instance of JspColoringData. + * @param sourceBean + */ public JspColoringData(Object sourceBean) { super(sourceBean); } - - public Map getPrefixMapper(){ + + @SuppressWarnings("ReturnOfCollectionOrArrayField") + public Map getPrefixMapper(){ return prefixMapper; } - + + @Override public String toString() { return "JSPColoringData, taglibMap:\n" + (prefixMapper == null ? @@ -71,9 +76,9 @@ public String toString() { mapToString(prefixMapper, " ") ); } - + private static String mapToString(Map m, String indent) { - StringBuffer sb = new StringBuffer(); + StringBuilder sb = new StringBuilder(); Iterator it = m.keySet().iterator(); while (it.hasNext()) { Object key = it.next(); @@ -82,7 +87,10 @@ private static String mapToString(Map m, String indent) { return sb.toString(); } - /** Returns true if the given tag library prefix is known in this page. + /** + * Returns true if the given tag library prefix is known in this page. + * @param prefix + * @return */ public boolean isTagLibRegistered(String prefix) { if ((taglibs == null) || (prefixMapper == null)) { @@ -91,56 +99,67 @@ public boolean isTagLibRegistered(String prefix) { return prefixMapper.containsKey(prefix); } - /** returns true if the JspColoringInfo has already been updated based on parser result. */ + /** + * returns true if the JspColoringInfo has already been updated based on parser result. + * @return + */ public boolean isInitialized() { return initialized; } - /** Returns true if the EL is ignored in this page. + /** + * Returns true if the EL is ignored in this page. + * @return */ public boolean isELIgnored() { return elIgnored; } - - /** Returns true if the page is in xml syntax (JSP Documnet). + + /** + * Returns true if the page is in xml syntax (JSP Documnet). * If the page is in standard syntax, returns false. + * + * @return */ public boolean isXMLSyntax(){ return xmlSyntax; } /*public boolean isBodyIntepretedByTag(String prefix, String tagName) { }*/ - + public void parsingStarted() { firePropertyChange(PROP_PARSING_IN_PROGRESS, null, true); } - + /** Incorporates new parse data from the parser, possibly firing a change about coloring. * @param newTaglibs the new map of (uri -> TagLibraryInfo) * @param newPrefixMapper the new map of (prefix, uri) + * @param newELIgnored + * @param newXMLSyntax * @param parseSuccessful whether parsing was successful. If false, then the new information is partial only */ + @SuppressWarnings("AssignmentToCollectionOrArrayFieldFromParameter") public void applyParsedData(Map newTaglibs, Map newPrefixMapper, boolean newELIgnored, boolean newXMLSyntax, boolean parseSuccessful) { initialized = true; // check whether coloring has not changed boolean coloringSame = equalsColoringInformation(taglibs, prefixMapper, newTaglibs, newPrefixMapper); - + firePropertyChange(PROP_PARSING_SUCCESSFUL, null, parseSuccessful); - + // check and apply EL data if (parseSuccessful) { coloringSame = coloringSame && (elIgnored == newELIgnored); elIgnored = newELIgnored; } - - //An additional check for the coloring change -> + + //An additional check for the coloring change -> //if the elIgnored and xmlSyntax have default values and the taglibs and prefixes are empty, - //there is no need to repaint the editor (fire the property change). + //there is no need to repaint the editor (fire the property change). //Test if this is a first call of this method - after opening of the editor if((taglibs == null) && (prefixMapper == null)) { - coloringSame = ((newELIgnored == elIgnored) && + coloringSame = ((newELIgnored == elIgnored) && (newXMLSyntax == xmlSyntax) && newTaglibs.isEmpty() && newPrefixMapper.isEmpty()); @@ -149,8 +168,8 @@ public void applyParsedData(Map newTaglibs, Map newTaglibs, Map taglibs1, Map prefixMapper1, - Map taglibs2, Map prefixMapper2) { + private static boolean equalsColoringInformation( + Map taglibs1, Map prefixMapper1, + Map taglibs2, Map prefixMapper2 + ) { if ((taglibs1 == null) != (taglibs2 == null)) { return false; @@ -218,10 +239,10 @@ private static boolean equalsColoringInformation(Map tag private static boolean equalsColoringInformation(TagLibraryInfo tli1, TagLibraryInfo tli2) { /** PENDING - * should be going through all tags and checking whether the value + * should be going through all tags and checking whether the value * returned by tagInfo.getBodyContent() has not changed. */ return true; } - + } diff --git a/enterprise/web.core/src/org/netbeans/modules/web/core/palette/JspPaletteUtilities.java b/enterprise/web.core/src/org/netbeans/modules/web/core/palette/JspPaletteUtilities.java index 0426a892548b..486f89c3f667 100644 --- a/enterprise/web.core/src/org/netbeans/modules/web/core/palette/JspPaletteUtilities.java +++ b/enterprise/web.core/src/org/netbeans/modules/web/core/palette/JspPaletteUtilities.java @@ -27,7 +27,6 @@ import javax.lang.model.element.Modifier; import javax.lang.model.element.TypeElement; import javax.lang.model.util.ElementFilter; -import javax.servlet.jsp.tagext.TagLibraryInfo; import javax.swing.text.BadLocationException; import javax.swing.text.Caret; import javax.swing.text.Document; @@ -43,6 +42,7 @@ import org.netbeans.modules.web.core.api.JspContextInfo; import org.netbeans.modules.web.jsps.parserapi.JspParserAPI; import org.netbeans.modules.web.jsps.parserapi.PageInfo; +import org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo; import org.openide.filesystems.FileObject; import org.openide.loaders.DataObject; import org.openide.util.Exceptions; @@ -250,7 +250,7 @@ public static String getTagLibPrefix(JTextComponent target, String tagLibUri) { if (fobj != null) { JspParserAPI.ParseResult result = JspContextInfo.getContextInfo(fobj).getCachedParseResult(fobj, false, true); if (result != null && result.getPageInfo() != null) { - for (TagLibraryInfo tli : result.getPageInfo().getTaglibs()) { + for (TagLibraryInfo tli : result.getPageInfo().getTagLibraries().values()) { if (tagLibUri.equals(tli.getURI())) return tli.getPrefixString(); } diff --git a/enterprise/web.el/nbproject/project.xml b/enterprise/web.el/nbproject/project.xml index 2e7872d6e8eb..9573023341a8 100644 --- a/enterprise/web.el/nbproject/project.xml +++ b/enterprise/web.el/nbproject/project.xml @@ -275,7 +275,7 @@ 1 - 1.0.20 + 1.62 diff --git a/enterprise/web.jsf.editor/nbproject/project.xml b/enterprise/web.jsf.editor/nbproject/project.xml index 56efc5701986..f11c256a0956 100644 --- a/enterprise/web.jsf.editor/nbproject/project.xml +++ b/enterprise/web.jsf.editor/nbproject/project.xml @@ -336,7 +336,7 @@ 1 - 1.0.20 + 1.62 @@ -465,7 +465,7 @@ - org.openide.util.ui + org.openide.util @@ -473,19 +473,19 @@ - org.openide.util + org.openide.util.lookup - 9.3 + 8.0 - org.openide.util.lookup + org.openide.util.ui - 8.0 + 9.3 diff --git a/enterprise/web.jsf/nbproject/project.xml b/enterprise/web.jsf/nbproject/project.xml index be658f1e344b..bbf3a1ed9d85 100644 --- a/enterprise/web.jsf/nbproject/project.xml +++ b/enterprise/web.jsf/nbproject/project.xml @@ -431,7 +431,7 @@ 1 - 1.3 + 1.62 @@ -482,8 +482,8 @@ - 3 - 3.9 + 4 + 4.0 diff --git a/enterprise/web.jsf20/nbproject/project.xml b/enterprise/web.jsf20/nbproject/project.xml index f34a3cebcad6..7aad95874141 100644 --- a/enterprise/web.jsf20/nbproject/project.xml +++ b/enterprise/web.jsf20/nbproject/project.xml @@ -31,7 +31,7 @@ 1 - 1.1 + 1.62 diff --git a/enterprise/web.jspparser/build.xml b/enterprise/web.jspparser/build.xml index 9e1ab51ddd2f..dcd26be865f4 100644 --- a/enterprise/web.jspparser/build.xml +++ b/enterprise/web.jspparser/build.xml @@ -27,6 +27,7 @@ + @@ -45,6 +46,7 @@ + @@ -58,6 +60,20 @@ zipfile="./external/generated-glassfish-jspparser-5.1.0.jar" /> + + + + + + + + + + + + @@ -72,18 +88,43 @@ + + + + + + + + + + + + + + + + - + - + + + + + + + + + + @@ -98,6 +139,9 @@ + + + diff --git a/enterprise/web.jspparser/external/binaries-list b/enterprise/web.jspparser/external/binaries-list index 9e1b7b61a0e3..e029434b246a 100644 --- a/enterprise/web.jspparser/external/binaries-list +++ b/enterprise/web.jspparser/external/binaries-list @@ -15,6 +15,10 @@ # specific language governing permissions and limitations # under the License. +A1B306DD295439765D0FD2F9B00A48501C892B88 org.glassfish.web:jakarta.servlet.jsp:3.0.0 +64280BAE9C1140FE4F007E87A9E2D1EA198BA200 org.glassfish:jakarta.el:5.0.0-M1 +302D7A9D82F8361EBB4F6944121E2A9E58EC1C9A org.glassfish.main.common:glassfish-ee-api:7.0.25 +423B91AB51675B6E58449A23ECB07A85C70FD3CC org.glassfish.main.common:common-util:7.0.25 13192D5874B787C0CE0C70B35E95181E8B683A1C org.glassfish.web:jakarta.servlet.jsp:2.3.6 F48473482C0E3E714F87186D9305BCAE30B7F5CB org.glassfish:jakarta.el:3.0.4 9A3D933B7B079AD73C43878BF09AC47586FAC897 org.glassfish.main.common:glassfish-ee-api:5.1.0 @@ -25,3 +29,6 @@ CED8804F81DB0C9099786472C615A12EA592C44B org.glassfish.main.common:common-util:5 34A035507F0270F1C6B7722D728BD7B5A9BBAC4C jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:1.2.7 F5A092DE3B2B087C14CA4B8D6F2C77A1F6802828 org.glassfish.web:jakarta.servlet.jsp.jstl:1.2.6 8CFF7DC1E492911F3DD7640EBFB60D6206A1DD40 commons-logging:commons-logging:1.3.1 +3993114CD341AFA42B2C2841C88EF653FA7EF3EE jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api:3.0.2 +078909A1354585B2A7A2D3B4E348FCEFF8B6D180 org.glassfish.web:jakarta.servlet.jsp.jstl:3.0.1 +8CFF7DC1E492911F3DD7640EBFB60D6206A1DD40 commons-logging:commons-logging:1.3.1 \ No newline at end of file diff --git a/enterprise/web.jspparser/external/generated-glassfish-jspparser-5.1.0-license.txt b/enterprise/web.jspparser/external/generated-glassfish-jspparser-7.0.25-license.txt similarity index 98% rename from enterprise/web.jspparser/external/generated-glassfish-jspparser-5.1.0-license.txt rename to enterprise/web.jspparser/external/generated-glassfish-jspparser-7.0.25-license.txt index 14e2e0ed72ed..1b809a4d53c5 100644 --- a/enterprise/web.jspparser/external/generated-glassfish-jspparser-5.1.0-license.txt +++ b/enterprise/web.jspparser/external/generated-glassfish-jspparser-7.0.25-license.txt @@ -3,8 +3,8 @@ License: EPL-v20 Description: GlassFish Unified JSP Parser Origin: Generated from common-util-5.1.0.jar, glassfish-ee-api-5.1.0.jar, jakarta.el-3.0.4.jar, and jakarta.servlet.jsp-2.3.6.jar Type: generated -Version: 5.1.0 -Files: generated-glassfish-jspparser-5.1.0.jar, common-util-5.1.0.jar, glassfish-ee-api-5.1.0.jar, jakarta.el-3.0.4.jar, jakarta.servlet.jsp-2.3.6.jar +Version: 7.0.25 +Files: generated-glassfish-jspparser-5.1.0.jar, common-util-5.1.0.jar, glassfish-ee-api-5.1.0.jar, jakarta.el-3.0.4.jar, jakarta.servlet.jsp-2.3.6.jar, generated-glassfish-jspparser-7.0.25.jar, common-util-7.0.25.jar, glassfish-ee-api-7.0.25.jar, jakarta.el-5.0.0-M1.jar, jakarta.servlet.jsp-3.0.0.jar Eclipse Public License - v 2.0 THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (“AGREEMENT”). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. diff --git a/enterprise/web.jspparser/external/jakarta.servlet.jsp.jstl-1.2-license.txt b/enterprise/web.jspparser/external/jakarta.servlet.jsp.jstl-1.2-license.txt index f8726ad9ddb4..075903e8ff2a 100644 --- a/enterprise/web.jspparser/external/jakarta.servlet.jsp.jstl-1.2-license.txt +++ b/enterprise/web.jspparser/external/jakarta.servlet.jsp.jstl-1.2-license.txt @@ -3,7 +3,7 @@ Version: 1.2 License: EPL-v20 Description: Jakarta Standard Tag Library Origin: Eclipse Foundation (https://projects.eclipse.org/projects/ee4j.jstl) -Files: jakarta.servlet.jsp.jstl-1.2.6.jar, jakarta.servlet.jsp.jstl-api-1.2.7.jar +Files: jakarta.servlet.jsp.jstl-1.2.6.jar, jakarta.servlet.jsp.jstl-api-1.2.7.jar, jakarta.servlet.jsp.jstl-3.0.1.jar, jakarta.servlet.jsp.jstl-api-3.0.2.jar Type: compile-time Eclipse Public License - v 2.0 diff --git a/enterprise/web.jspparser/extsrc/org/apache/jasper/compiler/GetParseData.java b/enterprise/web.jspparser/extsrc/org/apache/jasper/compiler/GetParseData.java index cecf4c87d868..bb7006a2689b 100644 --- a/enterprise/web.jspparser/extsrc/org/apache/jasper/compiler/GetParseData.java +++ b/enterprise/web.jspparser/extsrc/org/apache/jasper/compiler/GetParseData.java @@ -28,15 +28,22 @@ import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.PageContext; -import javax.servlet.jsp.tagext.TagAttributeInfo; -import javax.servlet.jsp.tagext.TagFileInfo; -import javax.servlet.jsp.tagext.TagInfo; -import javax.servlet.jsp.tagext.TagLibraryInfo; +import jakarta.servlet.jsp.JspException; +import jakarta.servlet.jsp.tagext.TagAttributeInfo; +import jakarta.servlet.jsp.tagext.TagData; +import jakarta.servlet.jsp.tagext.TagFileInfo; +import jakarta.servlet.jsp.tagext.TagInfo; +import jakarta.servlet.jsp.tagext.TagLibraryInfo; +import jakarta.servlet.jsp.tagext.TagVariableInfo; +import jakarta.servlet.jsp.tagext.VariableInfo; +import java.io.IOException; +import java.util.concurrent.ConcurrentHashMap; +import java.util.stream.Collectors; +import java.util.stream.Stream; import org.apache.jasper.JasperException; import org.apache.jasper.JspCompilationContext; import org.apache.jasper.Options; +import org.openide.util.Utilities; /** @@ -58,7 +65,12 @@ public class GetParseData { private Throwable parseException; - /** Creates a new instance of ExtractPageData */ + /** + * Creates a new instance of ExtractPageData + * + * @param ctxt + * @param errorReportingMode + */ public GetParseData(JspCompilationContext ctxt, int errorReportingMode) { this.ctxt = ctxt; this.errorReportingMode = errorReportingMode; @@ -242,9 +254,7 @@ public void parse() { // PENDING - we may need to process tag files somehow // tfp.removeProtoTypeFiles(ctxt.getClassFileName()); - } catch (ThreadDeath t) { - throw t; - } catch (Throwable t) { + } catch (IOException | JasperException | RuntimeException t) { parseException = t; } finally { // convert the nodes @@ -279,9 +289,13 @@ private static org.netbeans.modules.web.jsps.parserapi.Node.Nodes convertNodes(N } private static org.netbeans.modules.web.jsps.parserapi.PageInfo convertPageInfo(PageInfo pageInfo, String xmlView, JspCompilationContext ctxt) throws JspException { + IdentityHashMap convertedObjects = new IdentityHashMap<>(); PageInfoImpl nbPageInfo = new PageInfoImpl( - getTaglibsMapReflect(pageInfo, ctxt), + getTaglibsMapReflect(pageInfo, ctxt).entrySet().stream().collect(Collectors.toMap( + e -> e.getKey(), + e -> convert(convertedObjects, e.getValue()) + )), getJSPPrefixMapperReflect(pageInfo), getXMLPrefixMapperReflect(pageInfo), ((CompilerHacks.HackPageInfo)pageInfo).getApproxXmlPrefixMapper(), @@ -315,11 +329,162 @@ private static org.netbeans.modules.web.jsps.parserapi.PageInfo convertPageInfo( nbPageInfo.setXMLView(xmlView); nbPageInfo.setTagFile(ctxt.isTagFile()); - nbPageInfo.setTagInfo(ctxt.getTagInfo()); - + nbPageInfo.setTagInfo(convert(convertedObjects, ctxt.getTagInfo())); + return nbPageInfo; } + private static org.netbeans.modules.web.jsps.parserapi.TagInfo convert(IdentityHashMap convertedObjects, TagInfo source) { + if(source == null) { + return null; + } + + if(convertedObjects.containsKey(source)) { + return (org.netbeans.modules.web.jsps.parserapi.TagInfo) convertedObjects.get(source); + } + + org.netbeans.modules.web.jsps.parserapi.TagInfo result = new org.netbeans.modules.web.jsps.parserapi.TagInfo(); + convertedObjects.put(source, result); + + TagData td = new TagData(new Object[][]{}); + result.setDisplayName(source.getDisplayName()); + result.setTagClassName(source.getTagClassName()); + result.setTagName(source.getTagName()); + result.setBodyContent(source.getBodyContent()); + result.setInfoString(source.getInfoString()); + result.setTagLibrary(convert(convertedObjects, source.getTagLibrary())); + result.getAttributes().addAll(stream(source.getAttributes()).map(s -> convert(convertedObjects, s)).toList()); + result.getVariables().addAll(stream(source.getTagVariableInfos()).map(s -> convert(convertedObjects, s)).toList()); + result.getRuntimeVariables().addAll(stream(source.getVariableInfo(td)).map(s -> convert(convertedObjects, s)).toList()); + + return result; + } + + private static org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo convert(IdentityHashMap convertedObjects, TagLibraryInfo source) { + if(source == null) { + return null; + } + + if(convertedObjects.containsKey(source)) { + return (org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo) convertedObjects.get(source); + } + + org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo result = new org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo(); + convertedObjects.put(source, result); + + result.setShortName(source.getShortName()); + result.setReliableURN(source.getReliableURN()); + result.setInfoString(source.getInfoString()); + result.setURI(source.getURI()); + result.setPrefixString(source.getPrefixString()); + result.setRequiredVersion(source.getRequiredVersion()); + result.setTlibversion(getFieldByReflection("tlibversion", source)); + result.getTags().addAll(stream(source.getTags()).map(s -> convert(convertedObjects, s)).toList()); + result.getTagFiles().addAll(stream(source.getTagFiles()).map(s -> convert(convertedObjects, s)).toList()); + + return result; + } + + private static org.netbeans.modules.web.jsps.parserapi.TagAttributeInfo convert(IdentityHashMap convertedObjects, TagAttributeInfo source) { + if(source == null) { + return null; + } + + if (convertedObjects.containsKey(source)) { + return (org.netbeans.modules.web.jsps.parserapi.TagAttributeInfo) convertedObjects.get(source); + } + + org.netbeans.modules.web.jsps.parserapi.TagAttributeInfo result = new org.netbeans.modules.web.jsps.parserapi.TagAttributeInfo(); + convertedObjects.put(source, result); + + result.setName(source.getName()); + result.setRequired(source.isRequired()); + result.setTypeName(source.getTypeName()); + result.setCanBeRequestTime(source.canBeRequestTime()); + result.setFragment(source.isFragment()); + + return result; + } + + private static org.netbeans.modules.web.jsps.parserapi.TagVariableInfo convert(IdentityHashMap convertedObjects, TagVariableInfo source) { + if(source == null) { + return null; + } + + if (convertedObjects.containsKey(source)) { + return (org.netbeans.modules.web.jsps.parserapi.TagVariableInfo) convertedObjects.get(source); + } + + org.netbeans.modules.web.jsps.parserapi.TagVariableInfo result = new org.netbeans.modules.web.jsps.parserapi.TagVariableInfo(); + convertedObjects.put(source, result); + + result.setNameGiven(source.getNameGiven()); + result.setNameFromAttribute(source.getNameFromAttribute()); + result.setClassName(source.getClassName()); + result.setDeclare(source.getDeclare()); + result.setScope(source.getScope()); + + return result; + } + + private static org.netbeans.modules.web.jsps.parserapi.VariableInfo convert(IdentityHashMap convertedObjects, VariableInfo source) { + if(source == null) { + return null; + } + + if (convertedObjects.containsKey(source)) { + return (org.netbeans.modules.web.jsps.parserapi.VariableInfo) convertedObjects.get(source); + } + + org.netbeans.modules.web.jsps.parserapi.VariableInfo result = new org.netbeans.modules.web.jsps.parserapi.VariableInfo(); + convertedObjects.put(source, result); + + result.setVarName(source.getVarName()); + result.setClassName(source.getClassName()); + result.setDeclare(source.getDeclare()); + + return result; + } + + private static org.netbeans.modules.web.jsps.parserapi.TagFileInfo convert(IdentityHashMap convertedObjects, TagFileInfo source) { + if(source == null) { + return null; + } + + if (convertedObjects.containsKey(source)) { + return (org.netbeans.modules.web.jsps.parserapi.TagFileInfo) convertedObjects.get(source); + } + + org.netbeans.modules.web.jsps.parserapi.TagFileInfo result = new org.netbeans.modules.web.jsps.parserapi.TagFileInfo(); + convertedObjects.put(source, result); + + result.setName(source.getName()); + result.setPath(source.getPath()); + result.setTagInfo(convert(convertedObjects, source.getTagInfo())); + + return result; + } + + private static Stream stream(T[] t) { + if(t == null) { + return Stream.empty(); + } else { + return Arrays.stream(t); + } + } + + private static String getFieldByReflection(String fieldName, TagLibraryInfo info) { + try { + java.lang.reflect.Field f = TagLibraryInfo.class.getDeclaredField(fieldName); + f.setAccessible(true); + return (String) f.get(info); + } + catch (NoSuchFieldException | IllegalAccessException | ClassCastException e) { + Logger.getLogger("global").log(Level.INFO, null, e); + } + return null; + } + private static org.netbeans.modules.web.jsps.parserapi.PageInfo.BeanData[] createBeanData(BeanRepository rep) { try { initBeanRepository(); @@ -343,19 +508,19 @@ private static org.netbeans.modules.web.jsps.parserapi.PageInfo.BeanData[] creat } } - static class PageInfoImpl extends org.netbeans.modules.web.jsps.parserapi.PageInfo { + private static class PageInfoImpl extends org.netbeans.modules.web.jsps.parserapi.PageInfo { public PageInfoImpl(/*BeanRepository beanRepository*/ - Map taglibsMap, - Map jspPrefixMapper, - Map xmlPrefixMapper, - Map approxXmlPrefixMapper, - List imports, - List dependants, - List includePrelude, - List includeCoda, - List pluginDcls, - Set prefixes + Map taglibsMap, + Map jspPrefixMapper, + Map> xmlPrefixMapper, + Map approxXmlPrefixMapper, + List imports, + List dependants, + List includePrelude, + List includeCoda, + List pluginDcls, + Set prefixes ) { super(taglibsMap, jspPrefixMapper, xmlPrefixMapper, approxXmlPrefixMapper, imports, dependants, includePrelude, includeCoda, pluginDcls, prefixes); @@ -385,7 +550,7 @@ public String toString() { } } - static class BeanDataImpl implements org.netbeans.modules.web.jsps.parserapi.PageInfo.BeanData { + private static class BeanDataImpl implements org.netbeans.modules.web.jsps.parserapi.PageInfo.BeanData { private final String id; private final String className; @@ -445,6 +610,7 @@ private static void initPageInfoFields() { } } + @SuppressWarnings("unchecked") private static List getPluginDclsReflect(PageInfo pageInfo) { initPageInfoFields(); try { @@ -455,7 +621,8 @@ private static List getPluginDclsReflect(PageInfo pageInfo) { } } - private static HashSet getPrefixesReflect(PageInfo pageInfo) { + @SuppressWarnings("unchecked") + private static HashSet getPrefixesReflect(PageInfo pageInfo) { initPageInfoFields(); try { return (HashSet)prefixesF.get(pageInfo); @@ -480,14 +647,15 @@ public TagFileInfoCacheRecord(long time, TagFileInfo info){ * The cache is changed, when a jsp page is parsed and a tag file was changed. */ - private static Map tagFileInfoCache = new HashMap(); - - private static Map getTaglibsMapReflect(PageInfo pageInfo, JspCompilationContext ctxt) { + private static final Map tagFileInfoCache = new ConcurrentHashMap<>(); + + @SuppressWarnings("unchecked") + private static Map getTaglibsMapReflect(PageInfo pageInfo, JspCompilationContext ctxt) { initPageInfoFields(); try { Map taglibs = (Map)taglibsMapF.get(pageInfo); Iterator iter = taglibs.values().iterator(); - TagLibraryInfo libInfo; + TagLibraryInfo libInfo; // Caching information about tag files from implicit libraries while (iter.hasNext()){ libInfo = (TagLibraryInfo)iter.next(); @@ -507,7 +675,7 @@ private static Map getTaglibsMapReflect(PageInfo pageInfo, JspCompilationContext String filePath = (String)tagFileMap.get(name); URL path = ctxt.getResource(filePath); - File file = new File (new URI( path.toExternalForm() )); + File file = Utilities.toFile(new URI( path.toExternalForm() )); // Is there the file in the cache? if (tagFileInfoCache.containsKey(path)){ TagFileInfoCacheRecord r = (TagFileInfoCacheRecord)tagFileInfoCache.get(path); @@ -520,17 +688,14 @@ private static Map getTaglibsMapReflect(PageInfo pageInfo, JspCompilationContext tagFileInfoCache.put(path, new TagFileInfoCacheRecord (file.lastModified(), libInfo.getTagFile(name))); } //Obtain information from the cache - tagFiles[index++] = tagFileInfoCache.get(path).tagFileInfo; + tagFiles[index] = tagFileInfoCache.get(path).tagFileInfo; + index++; } Field tagInfosF = ImplicitTagLibraryInfo.class.getSuperclass().getDeclaredField("tagFiles"); tagInfosF.setAccessible(true); tagInfosF.set(libInfo, tagFiles); } - } catch (NoSuchFieldException e) { - LOGGER.log(Level.INFO, null, e); - } catch (MalformedURLException e) { - LOGGER.log(Level.INFO, null, e); - } catch (URISyntaxException e) { + } catch (NoSuchFieldException | MalformedURLException | URISyntaxException e) { LOGGER.log(Level.INFO, null, e); } } @@ -541,20 +706,22 @@ private static Map getTaglibsMapReflect(PageInfo pageInfo, JspCompilationContext } } - private static Map getJSPPrefixMapperReflect(PageInfo pageInfo) { + @SuppressWarnings("unchecked") + private static Map getJSPPrefixMapperReflect(PageInfo pageInfo) { initPageInfoFields(); try { - return (Map)jspPrefixMapperF.get(pageInfo); + return (Map) jspPrefixMapperF.get(pageInfo); } catch (IllegalAccessException e) { LOGGER.log(Level.INFO, null, e); throw new RuntimeException(); } } - private static Map getXMLPrefixMapperReflect(PageInfo pageInfo) { + @SuppressWarnings("unchecked") + private static Map> getXMLPrefixMapperReflect(PageInfo pageInfo) { initPageInfoFields(); try { - return (Map)xmlPrefixMapperF.get(pageInfo); + return (Map>) xmlPrefixMapperF.get(pageInfo); } catch (IllegalAccessException e) { LOGGER.log(Level.INFO, null, e); throw new RuntimeException(); diff --git a/enterprise/web.jspparser/extsrc/org/apache/jasper/compiler/NbValidator.java b/enterprise/web.jspparser/extsrc/org/apache/jasper/compiler/NbValidator.java index b15251b5ebc1..a3df3c2534d8 100644 --- a/enterprise/web.jspparser/extsrc/org/apache/jasper/compiler/NbValidator.java +++ b/enterprise/web.jspparser/extsrc/org/apache/jasper/compiler/NbValidator.java @@ -25,7 +25,7 @@ import java.util.logging.Level; import java.util.logging.Logger; -import javax.servlet.jsp.tagext.PageData; +import jakarta.servlet.jsp.tagext.PageData; import org.apache.jasper.JasperException; diff --git a/enterprise/web.jspparser/extsrc/org/apache/jasper/compiler/NodeConverterVisitor.java b/enterprise/web.jspparser/extsrc/org/apache/jasper/compiler/NodeConverterVisitor.java index 33672cde9871..86a534ed2ca4 100644 --- a/enterprise/web.jspparser/extsrc/org/apache/jasper/compiler/NodeConverterVisitor.java +++ b/enterprise/web.jspparser/extsrc/org/apache/jasper/compiler/NodeConverterVisitor.java @@ -23,14 +23,14 @@ import org.xml.sax.Attributes; import java.util.*; +import jakarta.servlet.jsp.tagext.TagAttributeInfo; // Note: this needs to live in the org.apache.jasper.compiler package. class NodeConverterVisitor extends Node.Visitor { - // walk the nodes, convert them, then new Nodes(List). - // (tomorrow) - org.netbeans.modules.web.jsps.parserapi.Node parentNode; - List convertedNodeList = null; + private final org.netbeans.modules.web.jsps.parserapi.Node parentNode; + private List convertedNodeList = null; + public NodeConverterVisitor(org.netbeans.modules.web.jsps.parserapi.Node parentNode) { this.parentNode = parentNode; } @@ -46,14 +46,12 @@ public NodeConverterVisitor(org.netbeans.modules.web.jsps.parserapi.Node parentN return serra.convertNodesList(jasperNodes); } + @SuppressWarnings("UseOfObsoleteCollectionType") protected org.netbeans.modules.web.jsps.parserapi.Node.Nodes convertNodesList(Node.Nodes jasperNodes) throws JasperException { - convertedNodeList = new Vector(); - int numChildNodes = jasperNodes.size(); + convertedNodeList = new Vector<>(); jasperNodes.visit(this); - org.netbeans.modules.web.jsps.parserapi.Node.Nodes nbNodes = - new org.netbeans.modules.web.jsps.parserapi.Node.Nodes(convertedNodeList); - return nbNodes; + return new org.netbeans.modules.web.jsps.parserapi.Node.Nodes(convertedNodeList); } public void convertBody(Node jn, org.netbeans.modules.web.jsps.parserapi.Node parentNode) @@ -80,6 +78,7 @@ public org.netbeans.modules.web.jsps.parserapi.Mark convertMark(Mark m) { } } + @Override public void visit(Node.PageDirective n) { org.netbeans.modules.web.jsps.parserapi.Node cn = new org.netbeans.modules.web.jsps.parserapi.Node.PageDirective(n.getAttributes(), @@ -87,7 +86,8 @@ public void visit(Node.PageDirective n) { parentNode); convertedNodeList.add(cn); } - + + @Override public void visit(Node.TaglibDirective n) { org.netbeans.modules.web.jsps.parserapi.Node cn = new org.netbeans.modules.web.jsps.parserapi.Node.TaglibDirective(n.getAttributes(), @@ -95,7 +95,8 @@ public void visit(Node.TaglibDirective n) { parentNode); convertedNodeList.add(cn); } - + + @Override public void visit(Node.AttributeDirective n) throws JasperException { org.netbeans.modules.web.jsps.parserapi.Node.AttributeDirective cn = new org.netbeans.modules.web.jsps.parserapi.Node.AttributeDirective(n.getAttributes(), @@ -105,6 +106,7 @@ public void visit(Node.AttributeDirective n) throws JasperException { convertedNodeList.add(cn); } + @Override public void visit(Node.VariableDirective n) throws JasperException { org.netbeans.modules.web.jsps.parserapi.Node.VariableDirective cn = new org.netbeans.modules.web.jsps.parserapi.Node.VariableDirective(n.getAttributes(), @@ -114,6 +116,7 @@ public void visit(Node.VariableDirective n) throws JasperException { convertedNodeList.add(cn); } + @Override public void visit(Node.IncludeDirective n) throws JasperException { org.netbeans.modules.web.jsps.parserapi.Node.IncludeDirective cn = new org.netbeans.modules.web.jsps.parserapi.Node.IncludeDirective(n.getAttributes(), @@ -122,7 +125,8 @@ public void visit(Node.IncludeDirective n) throws JasperException { convertBody(n, cn); convertedNodeList.add(cn); } - + + @Override public void visit(Node.Comment n) { org.netbeans.modules.web.jsps.parserapi.Node cn = new org.netbeans.modules.web.jsps.parserapi.Node.Comment(n.getText(), @@ -130,7 +134,8 @@ public void visit(Node.Comment n) { parentNode); convertedNodeList.add(cn); } - + + @Override public void visit(Node.Declaration n) { org.netbeans.modules.web.jsps.parserapi.Node cn = new org.netbeans.modules.web.jsps.parserapi.Node.Declaration(n.getText(), @@ -138,7 +143,8 @@ public void visit(Node.Declaration n) { parentNode); convertedNodeList.add(cn); } - + + @Override public void visit(Node.Expression n) { org.netbeans.modules.web.jsps.parserapi.Node cn = new org.netbeans.modules.web.jsps.parserapi.Node.Expression(n.getText(), @@ -146,7 +152,8 @@ public void visit(Node.Expression n) { parentNode); convertedNodeList.add(cn); } - + + @Override public void visit(Node.Scriptlet n) { org.netbeans.modules.web.jsps.parserapi.Node cn = new org.netbeans.modules.web.jsps.parserapi.Node.Scriptlet(n.getText(), @@ -154,7 +161,8 @@ public void visit(Node.Scriptlet n) { parentNode); convertedNodeList.add(cn); } - + + @Override public void visit(Node.IncludeAction n) throws JasperException { org.netbeans.modules.web.jsps.parserapi.Node.IncludeAction cn = new org.netbeans.modules.web.jsps.parserapi.Node.IncludeAction(n.getAttributes(), @@ -163,7 +171,8 @@ public void visit(Node.IncludeAction n) throws JasperException { convertBody(n, cn); convertedNodeList.add(cn); } - + + @Override public void visit(Node.DoBodyAction n) throws JasperException { org.netbeans.modules.web.jsps.parserapi.Node.DoBodyAction cn = new org.netbeans.modules.web.jsps.parserapi.Node.DoBodyAction(n.getAttributes(), @@ -173,7 +182,7 @@ public void visit(Node.DoBodyAction n) throws JasperException { convertedNodeList.add(cn); } - + @Override public void visit(Node.ForwardAction n) throws JasperException { org.netbeans.modules.web.jsps.parserapi.Node.ForwardAction cn = new org.netbeans.modules.web.jsps.parserapi.Node.ForwardAction(n.getAttributes(), @@ -182,7 +191,8 @@ public void visit(Node.ForwardAction n) throws JasperException { convertBody(n, cn); convertedNodeList.add(cn); } - + + @Override public void visit(Node.GetProperty n) { org.netbeans.modules.web.jsps.parserapi.Node cn = new org.netbeans.modules.web.jsps.parserapi.Node.GetProperty(n.getAttributes(), @@ -190,7 +200,8 @@ public void visit(Node.GetProperty n) { parentNode); convertedNodeList.add(cn); } - + + @Override public void visit(Node.SetProperty n) throws JasperException { org.netbeans.modules.web.jsps.parserapi.Node.SetProperty cn = new org.netbeans.modules.web.jsps.parserapi.Node.SetProperty(n.getAttributes(), @@ -199,7 +210,8 @@ public void visit(Node.SetProperty n) throws JasperException { convertBody(n, cn); convertedNodeList.add(cn); } - + + @Override public void visit(Node.UseBean n) throws JasperException { org.netbeans.modules.web.jsps.parserapi.Node.UseBean cn = new org.netbeans.modules.web.jsps.parserapi.Node.UseBean(n.getAttributes(), @@ -208,7 +220,8 @@ public void visit(Node.UseBean n) throws JasperException { convertBody(n, cn); convertedNodeList.add(cn); } - + + @Override public void visit(Node.PlugIn n) throws JasperException { org.netbeans.modules.web.jsps.parserapi.Node.PlugIn cn = new org.netbeans.modules.web.jsps.parserapi.Node.PlugIn(n.getAttributes(), @@ -217,7 +230,8 @@ public void visit(Node.PlugIn n) throws JasperException { convertBody(n, cn); convertedNodeList.add(cn); } - + + @Override public void visit(Node.ParamsAction n) throws JasperException { org.netbeans.modules.web.jsps.parserapi.Node.ParamsAction cn = new org.netbeans.modules.web.jsps.parserapi.Node.ParamsAction(convertMark(n.getStart()), @@ -225,7 +239,8 @@ public void visit(Node.ParamsAction n) throws JasperException { convertBody(n, cn); convertedNodeList.add(cn); } - + + @Override public void visit(Node.ParamAction n) throws JasperException { org.netbeans.modules.web.jsps.parserapi.Node.ParamAction cn = new org.netbeans.modules.web.jsps.parserapi.Node.ParamAction(n.getAttributes(), @@ -234,7 +249,8 @@ public void visit(Node.ParamAction n) throws JasperException { convertBody(n, cn); convertedNodeList.add(cn); } - + + @Override public void visit(Node.InvokeAction n) { org.netbeans.modules.web.jsps.parserapi.Node cn = new org.netbeans.modules.web.jsps.parserapi.Node.InvokeAction(n.getAttributes(), @@ -242,7 +258,8 @@ public void visit(Node.InvokeAction n) { parentNode); convertedNodeList.add(cn); } - + + @Override public void visit(Node.NamedAttribute n) throws JasperException { org.netbeans.modules.web.jsps.parserapi.Node.NamedAttribute cn = new org.netbeans.modules.web.jsps.parserapi.Node.NamedAttribute(n.getAttributes(), @@ -251,7 +268,8 @@ public void visit(Node.NamedAttribute n) throws JasperException { convertBody(n, cn); convertedNodeList.add(cn); } - + + @Override public void visit(Node.JspBody n) throws JasperException { org.netbeans.modules.web.jsps.parserapi.Node.JspBody cn = new org.netbeans.modules.web.jsps.parserapi.Node.JspBody(convertMark(n.getStart()), @@ -259,7 +277,8 @@ public void visit(Node.JspBody n) throws JasperException { convertBody(n, cn); convertedNodeList.add(cn); } - + + @Override public void visit(Node.ELExpression n) { org.netbeans.modules.web.jsps.parserapi.Node cn = new org.netbeans.modules.web.jsps.parserapi.Node.ELExpression(n.getText(), @@ -267,38 +286,46 @@ public void visit(Node.ELExpression n) { parentNode); convertedNodeList.add(cn); } - + + @Override public void visit(Node.CustomTag n) throws JasperException { - org.netbeans.modules.web.jsps.parserapi.Node.CustomTag cn = null; + org.netbeans.modules.web.jsps.parserapi.Node.CustomTag cn; if (n.getTagFileInfo() == null) { // no tag file cn = new org.netbeans.modules.web.jsps.parserapi.Node.CustomTag(n.getQName(), - n.getPrefix(), - n.getLocalName(), - n.getURI(), - n.getAttributes(), - convertMark(n.getStart()), - parentNode, - n.getTagInfo(), - n.getTagHandlerClass() + n.getPrefix(), + n.getLocalName(), + n.getURI(), + n.getAttributes(), + convertMark(n.getStart()), + parentNode, + n.getTagHandlerClass() ); - } - else { + } else { // we do have a tag file + Set fragmentAttributes = new HashSet<>(); + for (TagAttributeInfo tai : n.getTagFileInfo().getTagInfo().getAttributes()) { + if (tai.isFragment()) { + fragmentAttributes.add(tai.getName()); + } + } cn = new org.netbeans.modules.web.jsps.parserapi.Node.CustomTag(n.getQName(), - n.getPrefix(), - n.getLocalName(), - n.getURI(), - n.getAttributes(), - convertMark(n.getStart()), - parentNode, - n.getTagFileInfo() + n.getPrefix(), + n.getLocalName(), + n.getURI(), + n.getAttributes(), + convertMark(n.getStart()), + parentNode, + true, + n.getTagFileInfo().getTagInfo().hasDynamicAttributes(), + fragmentAttributes ); } - convertBody(n, cn); - convertedNodeList.add(cn); + convertBody(n, cn); + convertedNodeList.add(cn); } - + + @Override public void visit(Node.UninterpretedTag n) throws JasperException { Attributes nonTaglibXmlnsAttrs = null; // ?? Attributes taglibAttrs = null; // ?? @@ -313,15 +340,15 @@ public void visit(Node.UninterpretedTag n) throws JasperException { convertBody(n, cn); convertedNodeList.add(cn); } - + + @Override public void visit(Node.TemplateText n) { org.netbeans.modules.web.jsps.parserapi.Node cn = new org.netbeans.modules.web.jsps.parserapi.Node.TemplateText(n.getText(), convertMark(n.getStart()), parentNode); convertedNodeList.add(cn); - } - - + } + } diff --git a/enterprise/web.jspparser/extsrc/org/netbeans/modules/web/jspparser_ext/Bundle.properties b/enterprise/web.jspparser/extsrc/org/netbeans/modules/web/jspparser_ext/Bundle.properties deleted file mode 100644 index 30dce6de51f5..000000000000 --- a/enterprise/web.jspparser/extsrc/org/netbeans/modules/web/jspparser_ext/Bundle.properties +++ /dev/null @@ -1,18 +0,0 @@ -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -MSG_errorDuringJspParsing=JSP cannot be parsed now. diff --git a/enterprise/web.jspparser/extsrc/org/netbeans/modules/web/jspparser_ext/OptionsImpl.java b/enterprise/web.jspparser/extsrc/org/netbeans/modules/web/jspparser_ext/OptionsImpl.java index 1490e8d8b563..e6d60da1af67 100644 --- a/enterprise/web.jspparser/extsrc/org/netbeans/modules/web/jspparser_ext/OptionsImpl.java +++ b/enterprise/web.jspparser/extsrc/org/netbeans/modules/web/jspparser_ext/OptionsImpl.java @@ -23,7 +23,7 @@ import java.util.HashSet; import java.util.logging.Level; import java.util.logging.Logger; -import javax.servlet.ServletContext; +import jakarta.servlet.ServletContext; import org.apache.jasper.JspC; import org.apache.jasper.Options; import org.apache.jasper.compiler.JspConfig; diff --git a/enterprise/web.jspparser/extsrc/org/netbeans/modules/web/jspparser_ext/WebAppParseSupport.java b/enterprise/web.jspparser/extsrc/org/netbeans/modules/web/jspparser_ext/WebAppParseSupport.java index d4fd828f4b01..526f8bee1cca 100644 --- a/enterprise/web.jspparser/extsrc/org/netbeans/modules/web/jspparser_ext/WebAppParseSupport.java +++ b/enterprise/web.jspparser/extsrc/org/netbeans/modules/web/jspparser_ext/WebAppParseSupport.java @@ -49,8 +49,8 @@ import java.util.concurrent.atomic.AtomicReference; import java.util.logging.*; import java.util.zip.ZipException; -import javax.servlet.ServletContext; -import javax.servlet.jsp.tagext.TagLibraryInfo; +import jakarta.servlet.ServletContext; +import jakarta.servlet.jsp.tagext.TagLibraryInfo; import org.netbeans.modules.web.api.webmodule.WebModule; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileSystem; @@ -70,17 +70,18 @@ import org.apache.jasper.compiler.JspRuntimeContext; import org.apache.jasper.runtime.TldScanner; import org.netbeans.api.java.classpath.ClassPath; +import org.netbeans.api.java.classpath.JavaClassPathConstants; import org.netbeans.modules.web.jspparser.ContextUtil; import org.netbeans.modules.web.jspparser.JspParserImpl; import org.netbeans.modules.web.jspparser.ParserServletContext; import org.netbeans.modules.web.jspparser.WebAppParseProxy; +import org.netbeans.modules.web.jspparser.WebModuleProvider; import org.openide.ErrorManager; import org.openide.filesystems.FileChangeAdapter; import org.openide.filesystems.FileEvent; import org.openide.filesystems.FileRenameEvent; import org.openide.filesystems.URLMapper; import org.openide.util.Exceptions; -import org.openide.util.NbBundle; import org.openide.util.RequestProcessor; import org.openide.util.Utilities; import org.openide.util.WeakListeners; @@ -109,7 +110,7 @@ * the whole cache). * @author Petr Jiricka, Tomas Mysik */ -public class WebAppParseSupport implements WebAppParseProxy, PropertyChangeListener, ParserServletContext.WebModuleProvider { +public class WebAppParseSupport implements WebAppParseProxy, PropertyChangeListener, WebModuleProvider { static final Logger LOG = Logger.getLogger(WebAppParseSupport.class.getName()); private static final JspParserAPI.JspOpenInfo DEFAULT_JSP_OPEN_INFO = new JspParserAPI.JspOpenInfo(false, "8859_1"); // NOI18N @@ -293,6 +294,18 @@ private void createClassLoaders() { } } } + + // For JDK 9+ we also need to query for the modular variants + cp = ClassPath.getClassPath(wmRoot, JavaClassPathConstants.MODULE_EXECUTE_CLASS_PATH); + if (cp != null) { + for (FileObject root : cp.getRoots()) { + helpurl = findInternalURL(root); + if (loadingTable.get(helpurl) == null) { + loadingTable.put(helpurl, helpurl); + tomcatTable.put(helpurl, findExternalURL(root)); + } + } + } } if (actualWebInf != null) { FileObject classesDir = actualWebInf.getFileObject("classes"); //NOI18N @@ -494,7 +507,7 @@ private void setResult(GetParseData gpd){ // ArrayIndexOutOfBoundsException - see issue 20919 // Throwable - see issue 21169, related to Tomcat bug 7124 // XXX has to be returned back to track all errors - e = Exceptions.attachLocalizedMessage(e, NbBundle.getMessage(WebAppParseSupport.class, "MSG_errorDuringJspParsing")); // NOI18N + e = Exceptions.attachLocalizedMessage(e, "JSP cannot be parsed now."); // NOI18N LOG.fine(e.getMessage()); LOG.log(Level.FINE, null, e); JspParserAPI.ErrorDescriptor error = constructErrorDescriptor(e, wmRoot, jspFile); diff --git a/enterprise/web.jspparser/manifest.mf b/enterprise/web.jspparser/manifest.mf index f1014d8238b3..368a52e81f22 100644 --- a/enterprise/web.jspparser/manifest.mf +++ b/enterprise/web.jspparser/manifest.mf @@ -1,6 +1,6 @@ Manifest-Version: 1.0 -OpenIDE-Module: org.netbeans.modules.web.jspparser/3 +OpenIDE-Module: org.netbeans.modules.web.jspparser/4 OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/web/jspparser/Bundle.properties -OpenIDE-Module-Specification-Version: 3.60 +OpenIDE-Module-Specification-Version: 4.0 OpenIDE-Module-Requires: org.openide.windows.IOProvider diff --git a/enterprise/web.jspparser/nbproject/org-netbeans-modules-web-jspparser.sig b/enterprise/web.jspparser/nbproject/org-netbeans-modules-web-jspparser.sig index dafcb19142e9..b3bc4b2b6f23 100644 --- a/enterprise/web.jspparser/nbproject/org-netbeans-modules-web-jspparser.sig +++ b/enterprise/web.jspparser/nbproject/org-netbeans-modules-web-jspparser.sig @@ -1,5 +1,5 @@ #Signature file v4.1 -#Version 3.59 +#Version 4.0 CLSS public abstract interface java.io.Serializable @@ -7,6 +7,7 @@ CLSS public java.lang.Object cons public init() meth protected java.lang.Object clone() throws java.lang.CloneNotSupportedException meth protected void finalize() throws java.lang.Throwable + anno 0 java.lang.Deprecated(boolean forRemoval=false, java.lang.String since="9") meth public boolean equals(java.lang.Object) meth public final java.lang.Class getClass() meth public final void notify() @@ -35,14 +36,14 @@ innr public static Nodes innr public static Root innr public static Text innr public static Visitor -meth public abstract void accept(org.netbeans.modules.web.jsps.parserapi.ELNode$Visitor) throws javax.servlet.jsp.JspException +meth public abstract void accept(org.netbeans.modules.web.jsps.parserapi.ELNode$Visitor) supr java.lang.Object CLSS public static org.netbeans.modules.web.jsps.parserapi.ELNode$ELText outer org.netbeans.modules.web.jsps.parserapi.ELNode cons public init(java.lang.String) meth public java.lang.String getText() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.ELNode$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.ELNode$Visitor) supr org.netbeans.modules.web.jsps.parserapi.ELNode hfds text @@ -53,14 +54,12 @@ meth public java.lang.String getName() meth public java.lang.String getPrefix() meth public java.lang.String getUri() meth public java.lang.String[] getParameters() -meth public javax.servlet.jsp.tagext.FunctionInfo getFunctionInfo() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.ELNode$Visitor) throws javax.servlet.jsp.JspException -meth public void setFunctionInfo(javax.servlet.jsp.tagext.FunctionInfo) +meth public void accept(org.netbeans.modules.web.jsps.parserapi.ELNode$Visitor) meth public void setMethodName(java.lang.String) meth public void setParameters(java.lang.String[]) meth public void setUri(java.lang.String) supr org.netbeans.modules.web.jsps.parserapi.ELNode -hfds functionInfo,methodName,name,parameters,prefix,uri +hfds methodName,name,parameters,prefix,uri CLSS public static org.netbeans.modules.web.jsps.parserapi.ELNode$Nodes outer org.netbeans.modules.web.jsps.parserapi.ELNode @@ -71,7 +70,7 @@ meth public java.lang.String getMapName() meth public java.util.Iterator iterator() meth public void add(org.netbeans.modules.web.jsps.parserapi.ELNode) meth public void setMapName(java.lang.String) -meth public void visit(org.netbeans.modules.web.jsps.parserapi.ELNode$Visitor) throws javax.servlet.jsp.JspException +meth public void visit(org.netbeans.modules.web.jsps.parserapi.ELNode$Visitor) supr java.lang.Object hfds list,mapName @@ -79,7 +78,7 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.ELNode$Root outer org.netbeans.modules.web.jsps.parserapi.ELNode cons public init(org.netbeans.modules.web.jsps.parserapi.ELNode$Nodes) meth public org.netbeans.modules.web.jsps.parserapi.ELNode$Nodes getExpression() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.ELNode$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.ELNode$Visitor) supr org.netbeans.modules.web.jsps.parserapi.ELNode hfds expr @@ -87,17 +86,17 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.ELNode$Text outer org.netbeans.modules.web.jsps.parserapi.ELNode cons public init(java.lang.String) meth public java.lang.String getText() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.ELNode$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.ELNode$Visitor) supr org.netbeans.modules.web.jsps.parserapi.ELNode hfds text CLSS public static org.netbeans.modules.web.jsps.parserapi.ELNode$Visitor outer org.netbeans.modules.web.jsps.parserapi.ELNode cons public init() -meth public void visit(org.netbeans.modules.web.jsps.parserapi.ELNode$ELText) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.ELNode$Function) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.ELNode$Root) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.ELNode$Text) throws javax.servlet.jsp.JspException +meth public void visit(org.netbeans.modules.web.jsps.parserapi.ELNode$ELText) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.ELNode$Function) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.ELNode$Root) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.ELNode$Text) supr java.lang.Object CLSS public abstract interface org.netbeans.modules.web.jsps.parserapi.JspParserAPI @@ -305,13 +304,13 @@ meth public void setBeginJavaLine(int) meth public void setBody(org.netbeans.modules.web.jsps.parserapi.Node$Nodes) meth public void setEndJavaLine(int) supr java.lang.Object -hfds ZERO_VARIABLE_INFO,isDummy +hfds isDummy CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$AttributeDirective outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$AttributeGenerator @@ -319,7 +318,7 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$AttributeGenerat cons public init(org.netbeans.modules.web.jsps.parserapi.Mark,java.lang.String,org.netbeans.modules.web.jsps.parserapi.Node$CustomTag) meth public java.lang.String getName() meth public org.netbeans.modules.web.jsps.parserapi.Node$CustomTag getTag() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node hfds name,tag @@ -344,15 +343,16 @@ hfds hasIncludeAction,hasParamAction,hasScriptingVars,hasSetProperty,hasUseBean, CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$Comment outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$CustomTag outer org.netbeans.modules.web.jsps.parserapi.Node -cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node,javax.servlet.jsp.tagext.TagFileInfo) -cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node,javax.servlet.jsp.tagext.TagInfo,java.lang.Class) -cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node,javax.servlet.jsp.tagext.TagFileInfo) -cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node,javax.servlet.jsp.tagext.TagInfo,java.lang.Class) +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node,boolean,boolean,java.util.Set) +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node,java.lang.Class) +fld public final static int AT_BEGIN = 1 +fld public final static int AT_END = 2 +fld public final static int NESTED = 0 meth public boolean checkIfAttributeIsJspFragment(java.lang.String) meth public boolean hasEmptyBody() meth public boolean implementsBodyTag() @@ -368,44 +368,38 @@ meth public java.lang.String getPrefix() meth public java.lang.String getTagHandlerPoolName() meth public java.lang.String getURI() meth public java.util.Vector getScriptingVars(int) -meth public javax.servlet.jsp.tagext.TagData getTagData() -meth public javax.servlet.jsp.tagext.TagFileInfo getTagFileInfo() -meth public javax.servlet.jsp.tagext.TagInfo getTagInfo() -meth public javax.servlet.jsp.tagext.TagVariableInfo[] getTagVariableInfos() -meth public javax.servlet.jsp.tagext.VariableInfo[] getVariableInfos() meth public org.netbeans.modules.web.jsps.parserapi.Node$ChildInfo getChildInfo() meth public org.netbeans.modules.web.jsps.parserapi.Node$CustomTag getCustomTagParent() meth public org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute[] getJspAttributes() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) meth public void setCustomTagParent(org.netbeans.modules.web.jsps.parserapi.Node$CustomTag) meth public void setJspAttributes(org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute[]) meth public void setNumCount(java.lang.Integer) meth public void setScriptingVars(java.util.Vector,int) -meth public void setTagData(javax.servlet.jsp.tagext.TagData) meth public void setTagHandlerClass(java.lang.Class) meth public void setTagHandlerPoolName(java.lang.String) supr org.netbeans.modules.web.jsps.parserapi.Node -hfds atBeginScriptingVars,atEndScriptingVars,childInfo,customNestingLevel,customTagParent,implementsBodyTag,implementsDynamicAttributes,implementsIterationTag,implementsSimpleTag,implementsTryCatchFinally,jspAttrs,nestedScriptingVars,numCount,prefix,tagData,tagFileInfo,tagHandlerClass,tagHandlerPoolName,tagInfo,uri,varInfos +hfds BODY_TAGS,DYNAMIC_ATTRIBUTES,ITERATION_TAGS,SIMPLE_TAGS,TRY_CATCH_FINALLY_TAGS,atBeginScriptingVars,atEndScriptingVars,childInfo,customNestingLevel,customTagParent,fragmentAttributes,implementsBodyTag,implementsDynamicAttributes,implementsIterationTag,implementsSimpleTag,implementsTryCatchFinally,isTagFile,jspAttrs,nestedScriptingVars,numCount,prefix,tagHandlerClass,tagHandlerPoolName,uri CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$Declaration outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node$ScriptingElement CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$DoBodyAction outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$ELExpression outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) meth public org.netbeans.modules.web.jsps.parserapi.ELNode$Nodes getEL() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) meth public void setEL(org.netbeans.modules.web.jsps.parserapi.ELNode$Nodes) supr org.netbeans.modules.web.jsps.parserapi.Node hfds el @@ -414,14 +408,14 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$Expression outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node$ScriptingElement CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$FallBackAction outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$ForwardAction @@ -429,7 +423,7 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$ForwardAction cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) meth public org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute getPage() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) meth public void setPage(org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute) supr org.netbeans.modules.web.jsps.parserapi.Node hfds page @@ -438,7 +432,7 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$GetProperty outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$IncludeAction @@ -446,7 +440,7 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$IncludeAction cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) meth public org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute getPage() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) meth public void setPage(org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute) supr org.netbeans.modules.web.jsps.parserapi.Node hfds page @@ -455,14 +449,14 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$IncludeDirective outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$InvokeAction outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute @@ -486,7 +480,7 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$JspBody cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) meth public org.netbeans.modules.web.jsps.parserapi.Node$ChildInfo getChildInfo() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node hfds childInfo @@ -496,7 +490,7 @@ cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes, cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) meth public org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute getNameAttribute() meth public org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute[] getJspAttributes() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) meth public void setJspAttributes(org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute[]) meth public void setNameAttribute(org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute) supr org.netbeans.modules.web.jsps.parserapi.Node @@ -505,19 +499,19 @@ hfds jspAttrs,nameAttr CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$JspOutput outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$JspRoot outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$JspText outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$NamedAttribute @@ -525,14 +519,13 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$NamedAttribute cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) meth public boolean isTrim() -meth public java.lang.String getLocalName() meth public java.lang.String getName() meth public java.lang.String getPrefix() meth public java.lang.String getText() meth public org.netbeans.modules.web.jsps.parserapi.Node$ChildInfo getChildInfo() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node -hfds childInfo,localName,name,prefix,trim +hfds childInfo,name,prefix,trim CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$Nodes outer org.netbeans.modules.web.jsps.parserapi.Node @@ -545,7 +538,7 @@ meth public org.netbeans.modules.web.jsps.parserapi.Node getNode(int) meth public org.netbeans.modules.web.jsps.parserapi.Node$Root getRoot() meth public void add(org.netbeans.modules.web.jsps.parserapi.Node) meth public void remove(org.netbeans.modules.web.jsps.parserapi.Node) -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr java.lang.Object hfds list,root @@ -554,7 +547,7 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$PageDirective cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) meth public java.util.List getImports() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) meth public void addImport(java.lang.String) supr org.netbeans.modules.web.jsps.parserapi.Node hfds imports @@ -564,7 +557,7 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$ParamAction cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) meth public org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute getValue() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) meth public void setValue(org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute) supr org.netbeans.modules.web.jsps.parserapi.Node hfds value @@ -573,7 +566,7 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$ParamsAction outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$PlugIn @@ -582,7 +575,7 @@ cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes, cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) meth public org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute getHeight() meth public org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute getWidth() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) meth public void setHeight(org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute) meth public void setWidth(org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute) supr org.netbeans.modules.web.jsps.parserapi.Node @@ -596,7 +589,7 @@ meth public boolean isXmlSyntax() meth public java.lang.String getJspConfigPageEncoding() meth public java.lang.String getPageEncoding() meth public org.netbeans.modules.web.jsps.parserapi.Node$Root getParentRoot() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) meth public void setIsDefaultPageEncoding(boolean) meth public void setIsEncodingSpecifiedInProlog(boolean) meth public void setJspConfigPageEncoding(java.lang.String) @@ -615,7 +608,7 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$Scriptlet outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node$ScriptingElement CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$SetProperty @@ -623,7 +616,7 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$SetProperty cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) meth public org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute getValue() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) meth public void setValue(org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute) supr org.netbeans.modules.web.jsps.parserapi.Node hfds value @@ -633,7 +626,7 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$TagDirective cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) meth public java.util.List getImports() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) meth public void addImport(java.lang.String) supr org.netbeans.modules.web.jsps.parserapi.Node hfds imports @@ -641,14 +634,14 @@ hfds imports CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$TaglibDirective outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$TemplateText outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) meth public boolean isAllSpace() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) meth public void ltrim() meth public void rtrim() supr org.netbeans.modules.web.jsps.parserapi.Node @@ -657,7 +650,7 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$UninterpretedTag outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) meth public org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute[] getJspAttributes() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) meth public void setJspAttributes(org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute[]) supr org.netbeans.modules.web.jsps.parserapi.Node hfds jspAttrs @@ -667,7 +660,7 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$UseBean cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) meth public org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute getBeanName() -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) meth public void setBeanName(org.netbeans.modules.web.jsps.parserapi.Node$JspAttribute) supr org.netbeans.modules.web.jsps.parserapi.Node hfds beanName @@ -676,52 +669,52 @@ CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$VariableDirectiv outer org.netbeans.modules.web.jsps.parserapi.Node cons public init(java.lang.String,org.xml.sax.Attributes,org.xml.sax.Attributes,org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) cons public init(org.xml.sax.Attributes,org.netbeans.modules.web.jsps.parserapi.Mark,org.netbeans.modules.web.jsps.parserapi.Node) -meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) throws javax.servlet.jsp.JspException +meth public void accept(org.netbeans.modules.web.jsps.parserapi.Node$Visitor) supr org.netbeans.modules.web.jsps.parserapi.Node CLSS public static org.netbeans.modules.web.jsps.parserapi.Node$Visitor outer org.netbeans.modules.web.jsps.parserapi.Node cons public init() -meth protected void doVisit(org.netbeans.modules.web.jsps.parserapi.Node) throws javax.servlet.jsp.JspException -meth protected void visitBody(org.netbeans.modules.web.jsps.parserapi.Node) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$AttributeDirective) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$AttributeGenerator) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$Comment) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$CustomTag) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$Declaration) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$DoBodyAction) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$ELExpression) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$Expression) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$FallBackAction) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$ForwardAction) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$GetProperty) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$IncludeAction) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$IncludeDirective) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$InvokeAction) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$JspBody) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$JspElement) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$JspOutput) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$JspRoot) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$JspText) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$NamedAttribute) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$PageDirective) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$ParamAction) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$ParamsAction) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$PlugIn) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$Root) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$Scriptlet) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$SetProperty) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$TagDirective) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$TaglibDirective) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$TemplateText) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$UninterpretedTag) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$UseBean) throws javax.servlet.jsp.JspException -meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$VariableDirective) throws javax.servlet.jsp.JspException +meth protected void doVisit(org.netbeans.modules.web.jsps.parserapi.Node) +meth protected void visitBody(org.netbeans.modules.web.jsps.parserapi.Node) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$AttributeDirective) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$AttributeGenerator) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$Comment) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$CustomTag) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$Declaration) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$DoBodyAction) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$ELExpression) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$Expression) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$FallBackAction) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$ForwardAction) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$GetProperty) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$IncludeAction) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$IncludeDirective) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$InvokeAction) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$JspBody) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$JspElement) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$JspOutput) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$JspRoot) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$JspText) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$NamedAttribute) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$PageDirective) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$ParamAction) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$ParamsAction) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$PlugIn) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$Root) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$Scriptlet) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$SetProperty) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$TagDirective) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$TaglibDirective) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$TemplateText) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$UninterpretedTag) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$UseBean) +meth public void visit(org.netbeans.modules.web.jsps.parserapi.Node$VariableDirective) supr java.lang.Object CLSS public abstract org.netbeans.modules.web.jsps.parserapi.PageInfo -cons public init(java.util.Map,java.util.Map,java.util.Map>,java.util.Map,java.util.List,java.util.List,java.util.List,java.util.List,java.util.List,java.util.Set) -fld public final static java.lang.String JSP_SERVLET_BASE = "javax.servlet.http.HttpServlet" +cons public init(java.util.Map,java.util.Map,java.util.Map>,java.util.Map,java.util.List,java.util.List,java.util.List,java.util.List,java.util.List,java.util.Set) +fld public final static java.lang.String JSP_SERVLET_BASE = "jakarta.servlet.http.HttpServlet" innr public abstract interface static BeanData meth public boolean containsPrefix(java.lang.String) meth public boolean hasJspRoot() @@ -737,7 +730,6 @@ meth public boolean isSession() meth public boolean isTagFile() meth public boolean isThreadSafe() meth public int getBuffer() -meth public java.lang.String functionInfoToString(javax.servlet.jsp.tagext.FunctionInfo,java.lang.String) meth public java.lang.String getAutoFlush() meth public java.lang.String getBufferValue() meth public java.lang.String getContentType() @@ -756,11 +748,10 @@ meth public java.lang.String getLanguage(boolean) meth public java.lang.String getOmitXmlDecl() meth public java.lang.String getSession() meth public java.lang.String getURI(java.lang.String) -meth public java.lang.String tagFileToString(javax.servlet.jsp.tagext.TagFileInfo,java.lang.String) -meth public java.lang.String tagInfoToString(javax.servlet.jsp.tagext.TagInfo,java.lang.String) -meth public java.lang.String tagLibraryInfoToString(javax.servlet.jsp.tagext.TagLibraryInfo,java.lang.String) +meth public java.lang.String tagFileToString(org.netbeans.modules.web.jsps.parserapi.TagFileInfo,java.lang.String) +meth public java.lang.String tagInfoToString(org.netbeans.modules.web.jsps.parserapi.TagInfo,java.lang.String) +meth public java.lang.String tagLibraryInfoToString(org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo,java.lang.String) meth public java.lang.String toString() -meth public java.util.Collection getTaglibs() meth public java.util.List getIncludeCoda() meth public java.util.List getIncludePrelude() meth public java.util.List getDependants() @@ -768,21 +759,21 @@ meth public java.util.List getImports() meth public java.util.Map getApproxXmlPrefixMapper() meth public java.util.Map getXMLPrefixMapper() meth public java.util.Map getJspPrefixMapper() -meth public java.util.Map getTagLibraries() -meth public javax.servlet.jsp.tagext.TagInfo getTagInfo() -meth public javax.servlet.jsp.tagext.TagLibraryInfo getTaglib(java.lang.String) +meth public java.util.Map getTagLibraries() meth public org.netbeans.modules.web.jsps.parserapi.PageInfo$BeanData[] getBeans() +meth public org.netbeans.modules.web.jsps.parserapi.TagInfo getTagInfo() +meth public org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo getTaglib(java.lang.String) meth public void addDependant(java.lang.String) meth public void addImport(java.lang.String) meth public void addImports(java.util.List) meth public void addPrefix(java.lang.String) meth public void addPrefixMapping(java.lang.String,java.lang.String) -meth public void addTaglib(java.lang.String,javax.servlet.jsp.tagext.TagLibraryInfo) +meth public void addTaglib(java.lang.String,org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo) meth public void popPrefixMapping(java.lang.String) meth public void pushPrefixMapping(java.lang.String,java.lang.String) -meth public void setAutoFlush(java.lang.String) throws javax.servlet.jsp.JspException +meth public void setAutoFlush(java.lang.String) meth public void setBeans(org.netbeans.modules.web.jsps.parserapi.PageInfo$BeanData[]) -meth public void setBufferValue(java.lang.String) throws javax.servlet.jsp.JspException +meth public void setBufferValue(java.lang.String) meth public void setContentType(java.lang.String) meth public void setDoctypeName(java.lang.String) meth public void setDoctypePublic(java.lang.String) @@ -794,17 +785,17 @@ meth public void setHasJspRoot(boolean) meth public void setIncludeCoda(java.util.Vector) meth public void setIncludePrelude(java.util.Vector) meth public void setInfo(java.lang.String) -meth public void setIsELIgnored(java.lang.String) throws javax.servlet.jsp.JspException -meth public void setIsErrorPage(java.lang.String) throws javax.servlet.jsp.JspException +meth public void setIsELIgnored(java.lang.String) +meth public void setIsErrorPage(java.lang.String) meth public void setIsJspPrefixHijacked(boolean) -meth public void setIsThreadSafe(java.lang.String) throws javax.servlet.jsp.JspException +meth public void setIsThreadSafe(java.lang.String) meth public void setLanguage(java.lang.String) meth public void setOmitXmlDecl(java.lang.String) meth public void setScriptingInvalid(boolean) meth public void setScriptless(boolean) -meth public void setSession(java.lang.String) throws javax.servlet.jsp.JspException +meth public void setSession(java.lang.String) meth public void setTagFile(boolean) -meth public void setTagInfo(javax.servlet.jsp.tagext.TagInfo) +meth public void setTagInfo(org.netbeans.modules.web.jsps.parserapi.TagInfo) supr java.lang.Object hfds TAG_FILE_INFO_COMPARATOR,approxXmlPrefixMapper,autoFlush,beans,buffer,bufferValue,contentType,defaultExtends,defaultLanguage,dependants,doctypeName,doctypePublic,doctypeSystem,errorPage,hasJspRoot,imports,includeCoda,includePrelude,info,isAutoFlush,isELIgnored,isELIgnoredValue,isErrorPage,isErrorPageValue,isJspPrefixHijacked,isSession,isTagFile,isThreadSafe,isThreadSafeValue,jspPrefixMapper,language,omitXmlDecl,pluginDcls,prefixes,scriptingInvalid,scriptless,session,tagInfo,taglibsMap,xmlPrefixMapper,xtends @@ -813,6 +804,103 @@ CLSS public abstract interface static org.netbeans.modules.web.jsps.parserapi.Pa meth public abstract java.lang.String getClassName() meth public abstract java.lang.String getId() +CLSS public org.netbeans.modules.web.jsps.parserapi.TagAttributeInfo +cons public init() +cons public init(java.lang.String,boolean,java.lang.String,boolean) +cons public init(java.lang.String,boolean,java.lang.String,boolean,boolean) +meth public boolean isCanBeRequestTime() +meth public boolean isFragment() +meth public boolean isRequired() +meth public java.lang.String getName() +meth public java.lang.String getTypeName() +meth public void setCanBeRequestTime(boolean) +meth public void setFragment(boolean) +meth public void setName(java.lang.String) +meth public void setRequired(boolean) +meth public void setTypeName(java.lang.String) +supr java.lang.Object +hfds canBeRequestTime,fragment,name,required,typeName + +CLSS public org.netbeans.modules.web.jsps.parserapi.TagFileInfo +cons public init() +cons public init(java.lang.String,java.lang.String,org.netbeans.modules.web.jsps.parserapi.TagInfo) +meth public java.lang.String getName() +meth public java.lang.String getPath() +meth public org.netbeans.modules.web.jsps.parserapi.TagInfo getTagInfo() +meth public void setName(java.lang.String) +meth public void setPath(java.lang.String) +meth public void setTagInfo(org.netbeans.modules.web.jsps.parserapi.TagInfo) +supr java.lang.Object +hfds name,path,tagInfo + +CLSS public org.netbeans.modules.web.jsps.parserapi.TagInfo +cons public init() +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo,java.lang.Object,java.util.List) +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo,java.lang.Object,org.netbeans.modules.web.jsps.parserapi.TagAttributeInfo[]) +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo,java.util.List) +fld public final static java.lang.String BODY_CONTENT_EMPTY = "empty" +fld public final static java.lang.String BODY_CONTENT_JSP = "JSP" +fld public final static java.lang.String BODY_CONTENT_SCRIPTLESS = "scriptless" +fld public final static java.lang.String BODY_CONTENT_TAG_DEPENDENT = "tagdependent" +meth public java.lang.String getBodyContent() +meth public java.lang.String getDisplayName() +meth public java.lang.String getInfoString() +meth public java.lang.String getTagClassName() +meth public java.lang.String getTagName() +meth public java.util.List getAttributes() +meth public java.util.List getVariables() +meth public java.util.List getRuntimeVariables() +meth public org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo getTagLibrary() +meth public void setBodyContent(java.lang.String) +meth public void setDisplayName(java.lang.String) +meth public void setInfoString(java.lang.String) +meth public void setTagClassName(java.lang.String) +meth public void setTagLibrary(org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo) +meth public void setTagName(java.lang.String) +supr java.lang.Object +hfds attributes,bodyContent,displayName,infoString,runtimeVariables,tagClassName,tagLibrary,tagName,variables + +CLSS public org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo +cons public init() +cons public init(java.lang.String) +cons public init(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.util.List,java.util.List) +meth public java.lang.String getInfoString() +meth public java.lang.String getPrefixString() +meth public java.lang.String getReliableURN() +meth public java.lang.String getRequiredVersion() +meth public java.lang.String getShortName() +meth public java.lang.String getTlibversion() +meth public java.lang.String getURI() +meth public java.util.List getTagFiles() +meth public java.util.List getTags() +meth public org.netbeans.modules.web.jsps.parserapi.TagFileInfo getTagFile(java.lang.String) +meth public org.netbeans.modules.web.jsps.parserapi.TagInfo getTag(java.lang.String) +meth public void setInfoString(java.lang.String) +meth public void setPrefixString(java.lang.String) +meth public void setReliableURN(java.lang.String) +meth public void setRequiredVersion(java.lang.String) +meth public void setShortName(java.lang.String) +meth public void setTlibversion(java.lang.String) +meth public void setURI(java.lang.String) +supr java.lang.Object +hfds URI,infoString,prefixString,reliableURN,requiredVersion,shortName,tagFiles,tags,tlibversion + +CLSS public org.netbeans.modules.web.jsps.parserapi.TagVariableInfo +cons public init() +cons public init(java.lang.String,java.lang.String,java.lang.String,boolean,int) +meth public boolean isDeclare() +meth public int getScope() +meth public java.lang.String getClassName() +meth public java.lang.String getNameFromAttribute() +meth public java.lang.String getNameGiven() +meth public void setClassName(java.lang.String) +meth public void setDeclare(boolean) +meth public void setNameFromAttribute(java.lang.String) +meth public void setNameGiven(java.lang.String) +meth public void setScope(int) +supr java.lang.Object +hfds className,declare,nameFromAttribute,nameGiven,scope + CLSS public final org.netbeans.modules.web.jsps.parserapi.TldChangeEvent cons public init(java.lang.Object,org.netbeans.modules.web.api.webmodule.WebModule) meth public org.netbeans.modules.web.api.webmodule.WebModule getWebModule() @@ -823,3 +911,15 @@ CLSS public abstract interface org.netbeans.modules.web.jsps.parserapi.TldChange intf java.util.EventListener meth public abstract void tldChange(org.netbeans.modules.web.jsps.parserapi.TldChangeEvent) +CLSS public org.netbeans.modules.web.jsps.parserapi.VariableInfo +cons public init() +cons public init(java.lang.String,java.lang.String,boolean) +meth public boolean isDeclare() +meth public java.lang.String getClassName() +meth public java.lang.String getVarName() +meth public void setClassName(java.lang.String) +meth public void setDeclare(boolean) +meth public void setVarName(java.lang.String) +supr java.lang.Object +hfds className,declare,varName + diff --git a/enterprise/web.jspparser/nbproject/project.properties b/enterprise/web.jspparser/nbproject/project.properties index a92a414fd3d9..1daa2d5ede6f 100644 --- a/enterprise/web.jspparser/nbproject/project.properties +++ b/enterprise/web.jspparser/nbproject/project.properties @@ -17,14 +17,17 @@ is.autoload=true javac.compilerargs=-Xlint:unchecked -javac.source=1.8 +javac.release=17 extsrc.cp.extra=external/generated-glassfish-jspparser-5.1.0.jar - -extra.module.files=modules/ext/jsp-parser-ext.jar +extsrc.cp.extra.jakarta=external/generated-glassfish-jspparser-7.0.25.jar release.external/generated-glassfish-jspparser-5.1.0.jar=modules/ext/glassfish-jspparser-5.1.0.jar -extra.module.files=modules/ext/glassfish-jspparser-5.1.0.jar +release.external/generated-glassfish-jspparser-7.0.25.jar=modules/ext/glassfish-jspparser-7.0.25.jar +extra.module.files=modules/ext/glassfish-jspparser-7.0.25.jar,\ + modules/ext/glassfish-jspparser-5.1.0.jar,\ + modules/ext/jsp-parser-ext-jakarta.jar,\ + modules/ext/jsp-parser-ext.jar javadoc.arch=${basedir}/arch.xml @@ -35,6 +38,13 @@ test-unit-sys-prop.jsp.parser.jars=\ ${servletjspapi.dir}/modules/ext/servlet4.0-jsp2.3-api.jar:\ ${o.apache.tools.ant.module.dir}/ant/lib/ant-launcher.jar +test-unit-sys-prop.jsp.parser.jars-jakarta=\ + ${o.apache.tools.ant.module.dir}/ant/lib/ant.jar:\ + ${web.jspparser.dir}/modules/ext/glassfish-jspparser-7.0.25.jar:\ + ${servletjspapi.dir}/modules/ext/jsp-parser-ext-jakarta.jar:\ + ${servletjspapi.dir}/modules/ext/servlet-jsp-api-6.1_3.0.jar:\ + ${o.apache.tools.ant.module.dir}/ant/lib/ant-launcher.jar + test-unit-sys-prop.jstl.jars=\ ${libs.jstl.dir}/modules/ext/jstl-api.jar:\ ${libs.jstl.dir}/modules/ext/jstl-impl.jar diff --git a/enterprise/web.jspparser/nbproject/project.xml b/enterprise/web.jspparser/nbproject/project.xml index 2b51797a653a..95291b3a2e7a 100644 --- a/enterprise/web.jspparser/nbproject/project.xml +++ b/enterprise/web.jspparser/nbproject/project.xml @@ -58,6 +58,15 @@ 1.0 + + org.netbeans.modules.j2ee.core + + + + 0 + 1.56 + + org.netbeans.modules.j2ee.dd @@ -73,7 +82,7 @@ 1 - 1.23 + 1.62 @@ -125,7 +134,7 @@ - org.openide.util.ui + org.openide.util @@ -133,19 +142,19 @@ - org.openide.util + org.openide.util.lookup - 9.3 + 8.0 - org.openide.util.lookup + org.openide.util.ui - 8.0 + 9.3 @@ -218,9 +227,9 @@ extsrc - ${module.classpath}:${cluster}/${module.jar}:${extsrc.cp.extra} + ${module.classpath}:${cluster}/${module.jar}:${extsrc.cp.extra.jakarta} build/extclasses - build/external/jsp-parser-ext.jar + build/external/jsp-parser-ext-jakarta.jar diff --git a/enterprise/web.jspparser/src/org/netbeans/modules/web/jspparser/JspParserImpl.java b/enterprise/web.jspparser/src/org/netbeans/modules/web/jspparser/JspParserImpl.java index c02af0b8ab5b..0a518aa5c1ac 100644 --- a/enterprise/web.jspparser/src/org/netbeans/modules/web/jspparser/JspParserImpl.java +++ b/enterprise/web.jspparser/src/org/netbeans/modules/web/jspparser/JspParserImpl.java @@ -35,6 +35,7 @@ import java.util.WeakHashMap; import java.util.logging.Level; import java.util.logging.Logger; +import org.netbeans.api.j2ee.core.Profile; import org.netbeans.modules.web.api.webmodule.WebModule; import org.netbeans.modules.web.jsps.parserapi.TldChangeListener; import org.netbeans.modules.web.jsps.parserapi.JspParserAPI; @@ -42,6 +43,7 @@ import org.openide.filesystems.FileObject; import org.openide.modules.InstalledFileLocator; import org.openide.util.NbBundle; +import org.openide.util.Utilities; // PENDING - need to call reinitOptions when something changes (taglib, jar, web.xml) // PENDING - separate to two classes, have a per-application instance of one of them @@ -52,11 +54,12 @@ public class JspParserImpl implements JspParserAPI { // @GuardedBy(this) - final Map parseSupports = new WeakHashMap(); + final Map parseSupports = new WeakHashMap<>(); private final TldChangeSupport tldChangeSupport; private static final Logger LOGGER = Logger.getLogger(JspParserImpl.class.getName()); private static Method webAppParserImplFactoryMethod; + private static Method webAppParserJakartaImplFactoryMethod; private static final JspParserAPI.JspOpenInfo DEFAULT_OPENINFO = new JspParserAPI.JspOpenInfo(false, "ISO-8859-1"); // NOI18N @@ -70,11 +73,11 @@ public JspParserImpl() { } private static URL[] urls; + private static URL[] urlsJakarta; private static final String[] JAR_FILE_NAMES = new String[]{ "ant/lib/ant.jar", //NOI18N "modules/ext/glassfish-jspparser-5.1.0.jar", //NOI18N -// "modules/ext/glassfish-logging.jar" //NOI18N "modules/ext/jsp-parser-ext.jar", //NOI18N "modules/ext/jstl-api.jar", //NOI18N "modules/ext/jstl-impl.jar", //NOI18N @@ -82,63 +85,79 @@ public JspParserImpl() { "ant/lib/ant-launcher.jar" //Glassfish V2 //NOI18N }; - private static void initURLs() throws MalformedURLException, IOException { - if (urls == null) { - File[] files = new File[JAR_FILE_NAMES.length]; - List missing = new ArrayList(); - for(int i = 0; i < JAR_FILE_NAMES.length; i++) { - files[i] = InstalledFileLocator.getDefault().locate(JAR_FILE_NAMES[i], null, false); - if(files[i] == null) { - missing.add(JAR_FILE_NAMES[i]); - } - } + private static final String[] JAR_FILE_NAMES_JAKARTA = new String[]{ + "ant/lib/ant.jar", //NOI18N + "modules/ext/glassfish-jspparser-7.0.25.jar", //NOI18N + "modules/ext/jsp-parser-ext-jakarta.jar", //NOI18N + "modules/ext/jstl-jakarta-api.jar", //NOI18N + "modules/ext/jstl-jakarta-impl.jar", //NOI18N + "modules/ext/servlet-jsp-api-6.1_3.0.jar", //NOI18N + "ant/lib/ant-launcher.jar" //Glassfish V2 //NOI18N + }; - if(!missing.isEmpty()) { - //something wasn't found, report error and cancel the initialization - StringBuffer msg = new StringBuffer(); - msg.append("Cannot initialize JSP parser, following JAR files couldn't be localted: "); //NOI18N - for(String fname : missing) { - msg.append(fname); - msg.append(','); //NOI18N - } - msg.setCharAt(msg.length() - 1, '.'); //replace last comma + private static void initURLs() throws MalformedURLException, IOException { + if (urls == null || urlsJakarta == null) { + urls = buildUrlsFromRelativePaths(JAR_FILE_NAMES); + urlsJakarta = buildUrlsFromRelativePaths(JAR_FILE_NAMES_JAKARTA); + } + } - throw new IOException(msg.toString()); + private static URL[] buildUrlsFromRelativePaths(String[] jarFileNames) throws IOException, MalformedURLException { + File[] files = new File[jarFileNames.length]; + List missing = new ArrayList<>(); + for(int i = 0; i < jarFileNames.length; i++) { + files[i] = InstalledFileLocator.getDefault().locate(jarFileNames[i], null, false); + if(files[i] == null) { + missing.add(jarFileNames[i]); } - - URL[] urls2 = new URL[files.length]; - for (int i = 0; i < files.length; i++) { - urls2[i] = files[i].toURI().toURL(); + } + if(!missing.isEmpty()) { + //something wasn't found, report error and cancel the initialization + StringBuilder msg = new StringBuilder(); + msg.append("Cannot initialize JSP parser, following JAR files couldn't be localted: "); //NOI18N + for(String fname : missing) { + msg.append(fname); + msg.append(','); //NOI18N } - urls = urls2; + msg.setCharAt(msg.length() - 1, '.'); //replace last comma + + throw new IOException(msg.toString()); } + URL[] urls2 = new URL[files.length]; + for (int i = 0; i < files.length; i++) { + urls2[i] = Utilities.toURI(files[i]).toURL(); + } + return urls2; } /** * This method is designed to be called only from unit tests to initialize * parser JARs. */ - public static void setParserJARs(URL[] urls) { + @SuppressWarnings("AssignmentToCollectionOrArrayFieldFromParameter") + public static void setParserJARs(URL[] urls, URL[] urlsJakarta) { JspParserImpl.urls = urls; + JspParserImpl.urlsJakarta = urlsJakarta; } - private static void initReflection() throws IOException { - if (webAppParserImplFactoryMethod == null) { + private static void initReflection(boolean jakarta) throws IOException { + if (((! jakarta) && webAppParserImplFactoryMethod == null) || (jakarta && webAppParserJakartaImplFactoryMethod == null)) { try { initURLs(); - ExtClassLoader urlCL = new ExtClassLoader(urls, JspParserImpl.class.getClassLoader()); + ExtClassLoader urlCL = new ExtClassLoader(jakarta ? urlsJakarta : urls, JspParserImpl.class.getClassLoader()); Class cl = urlCL.loadClass("org.netbeans.modules.web.jspparser_ext.WebAppParseSupport"); // NOI18N - webAppParserImplFactoryMethod = cl.getDeclaredMethod("create", JspParserImpl.class, WebModule.class); // NOI18N - } catch (NoSuchMethodException e) { - LOGGER.log(Level.INFO, null, e); - } catch (MalformedURLException e) { - LOGGER.log(Level.INFO, null, e); - } catch (ClassNotFoundException e) { + if(jakarta) { + webAppParserJakartaImplFactoryMethod = cl.getDeclaredMethod("create", JspParserImpl.class, WebModule.class); // NOI18N + } else { + webAppParserImplFactoryMethod = cl.getDeclaredMethod("create", JspParserImpl.class, WebModule.class); // NOI18N + } + } catch (NoSuchMethodException | MalformedURLException | ClassNotFoundException e) { LOGGER.log(Level.INFO, null, e); } } } + @Override public JspParserAPI.JspOpenInfo getJspOpenInfo(FileObject jspFile, WebModule wm, boolean useEditor) { //try to fast create openinfo @@ -164,6 +183,7 @@ public JspParserAPI.JspOpenInfo getJspOpenInfo(FileObject jspFile, WebModule wm, return DEFAULT_OPENINFO; } + @Override public JspParserAPI.ParseResult analyzePage(FileObject jspFile, WebModule wm, int errorReportingMode) { if (wm == null) { return getNoWebModuleResult(jspFile, null); @@ -189,6 +209,7 @@ public JspParserAPI.ParseResult analyzePage(FileObject jspFile, WebModule wm, in * [0] The location * [1] If the location is a jar file, this is the location of the tld. */ + @Override public Map getTaglibMap(WebModule wm) throws IOException { FileObject wmRoot = wm.getDocumentBase(); if (wmRoot == null) { @@ -210,33 +231,39 @@ private synchronized WebAppParseProxy getParseProxy(WebModule wm) { private WebAppParseProxy createParseProxy(WebModule wm) { // PENDING - do caching for individual JSPs try { - initReflection(); - return (WebAppParseProxy) webAppParserImplFactoryMethod.invoke(null, this, wm); + if(wm.getJ2eeProfile().isAtLeast(Profile.JAKARTA_EE_9_WEB)) { + initReflection(true); // Jakarta Variant + return (WebAppParseProxy) webAppParserJakartaImplFactoryMethod.invoke(null, this, wm); + } else { + initReflection(false); // Javax Variant + return (WebAppParseProxy) webAppParserImplFactoryMethod.invoke(null, this, wm); + } } catch (IOException ise) { LOGGER.log(Level.WARNING, null, ise); - } catch (IllegalAccessException e) { - LOGGER.log(Level.INFO, null, e); - } catch (InvocationTargetException e) { + } catch (IllegalAccessException | InvocationTargetException e) { LOGGER.log(Level.INFO, null, e); } return null; } + @Override public URLClassLoader getModuleClassLoader(WebModule wm) { WebAppParseProxy pp = getParseProxy(wm); return pp.getWAClassLoader(); } - private JspParserAPI.ParseResult getNoWebModuleResult(FileObject jspFile, WebModule wm) { + private JspParserAPI.ParseResult getNoWebModuleResult(FileObject jspFile, @SuppressWarnings("unused") WebModule wm) { JspParserAPI.ErrorDescriptor error = new JspParserAPI.ErrorDescriptor(null, jspFile, -1, -1, NbBundle.getMessage(JspParserImpl.class, "MSG_webModuleNotFound", jspFile.getNameExt()), ""); // NOI18N return new JspParserAPI.ParseResult(new JspParserAPI.ErrorDescriptor[] {error}); } + @Override public void addTldChangeListener(TldChangeListener listener) { tldChangeSupport.addTldChangeListener(listener); } + @Override public void removeTldChangeListener(TldChangeListener listener) { tldChangeSupport.removeTldChangeListener(listener); } diff --git a/enterprise/web.jspparser/src/org/netbeans/modules/web/jspparser/ParserServletContext.java b/enterprise/web.jspparser/src/org/netbeans/modules/web/jspparser/ParserServletContext.java index e11f75cfedb6..84faf5f53e83 100644 --- a/enterprise/web.jspparser/src/org/netbeans/modules/web/jspparser/ParserServletContext.java +++ b/enterprise/web.jspparser/src/org/netbeans/modules/web/jspparser/ParserServletContext.java @@ -38,20 +38,20 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.logging.Level; import java.util.logging.Logger; -import javax.servlet.Filter; -import javax.servlet.FilterRegistration; -import javax.servlet.RequestDispatcher; -import javax.servlet.Servlet; -import javax.servlet.ServletContext; -import javax.servlet.ServletException; -import javax.servlet.ServletRegistration; -import javax.servlet.ServletRegistration.Dynamic; -import javax.servlet.SessionCookieConfig; -import javax.servlet.SessionTrackingMode; -import javax.servlet.descriptor.JspConfigDescriptor; -import javax.servlet.descriptor.JspPropertyGroupDescriptor; -import javax.servlet.descriptor.TaglibDescriptor; -import javax.servlet.jsp.tagext.TagLibraryInfo; +import jakarta.servlet.Filter; +import jakarta.servlet.FilterRegistration; +import jakarta.servlet.RequestDispatcher; +import jakarta.servlet.Servlet; +import jakarta.servlet.ServletContext; +import jakarta.servlet.ServletException; +import jakarta.servlet.ServletRegistration; +import jakarta.servlet.ServletRegistration.Dynamic; +import jakarta.servlet.SessionCookieConfig; +import jakarta.servlet.SessionTrackingMode; +import jakarta.servlet.descriptor.JspConfigDescriptor; +import jakarta.servlet.descriptor.JspPropertyGroupDescriptor; +import jakarta.servlet.descriptor.TaglibDescriptor; +import jakarta.servlet.jsp.tagext.TagLibraryInfo; import org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException; import org.netbeans.modules.j2ee.dd.api.web.DDProvider; import org.netbeans.modules.j2ee.dd.api.web.JspConfig; @@ -795,18 +795,6 @@ public void setResponseCharacterEncoding(String encoding) { } - /** - * This interface delegates lifecycle of {@link WebModule} to the caller. - * See issue #85817 for more information. - */ - public interface WebModuleProvider { - /** - * Get {@link WebModule} instance. - * @return {@link WebModule} instance or null if WebModule has already been garbage collected. - */ - WebModule getWebModule(); - } - private static class JspPropertyGroupDescriptorImpl implements JspPropertyGroupDescriptor { private Collection urlPatterns; @@ -866,6 +854,11 @@ public Collection getIncludeCodas() { return includeCodas; } + @Override + public String getErrorOnELNotFound() { + return "ErrorOnELNotFound"; + } + @Override public String getDeferredSyntaxAllowedAsLiteral() { return "IGNORE ME - THIS VALUE IS NOT SUPPOSED TO BE USED"; // NOI18N diff --git a/enterprise/web.jspparser/src/org/netbeans/modules/web/jspparser/ParserServletContextJavax.java b/enterprise/web.jspparser/src/org/netbeans/modules/web/jspparser/ParserServletContextJavax.java new file mode 100644 index 000000000000..62e5322f5387 --- /dev/null +++ b/enterprise/web.jspparser/src/org/netbeans/modules/web/jspparser/ParserServletContextJavax.java @@ -0,0 +1,887 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.netbeans.modules.web.jspparser; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.net.MalformedURLException; +import java.net.URL; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Enumeration; +import java.util.EventListener; +import java.util.HashSet; +import java.util.Hashtable; +import java.util.Map; +import java.util.Set; +import java.util.Vector; +import java.util.concurrent.ConcurrentHashMap; +import java.util.logging.Level; +import java.util.logging.Logger; +import javax.servlet.Filter; +import javax.servlet.FilterRegistration; +import javax.servlet.RequestDispatcher; +import javax.servlet.Servlet; +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.ServletRegistration; +import javax.servlet.ServletRegistration.Dynamic; +import javax.servlet.SessionCookieConfig; +import javax.servlet.SessionTrackingMode; +import javax.servlet.descriptor.JspConfigDescriptor; +import javax.servlet.descriptor.JspPropertyGroupDescriptor; +import javax.servlet.descriptor.TaglibDescriptor; +import javax.servlet.jsp.tagext.TagLibraryInfo; +import org.netbeans.modules.j2ee.dd.api.common.VersionNotSupportedException; +import org.netbeans.modules.j2ee.dd.api.web.DDProvider; +import org.netbeans.modules.j2ee.dd.api.web.JspConfig; +import org.netbeans.modules.j2ee.dd.api.web.JspPropertyGroup; +import org.netbeans.modules.j2ee.dd.api.web.Taglib; +import org.netbeans.modules.j2ee.dd.api.web.WebApp; +import org.netbeans.modules.web.api.webmodule.WebModule; +import org.openide.cookies.EditorCookie; +import org.openide.filesystems.FileObject; +import org.openide.filesystems.FileUtil; +import org.openide.filesystems.URLMapper; +import org.openide.loaders.DataObject; +import org.openide.loaders.DataObjectNotFoundException; +import org.openide.text.CloneableEditorSupport; +import org.openide.util.NbBundle; + +/** + * Simple ServletContext implementation without + * HTTP-specific methods. + * + * @author Peter Rossbach (pr@webapp.de) + */ + +public class ParserServletContextJavax implements ServletContext { + + public static final String JSP_TAGLIBRARY_CACHE = "com.sun.jsp.taglibraryCache"; + public static final String JSP_TAGFILE_JAR_URLS_CACHE = "com.sun.jsp.tagFileJarUrlsCache"; + + private static final Logger LOGGER = Logger.getLogger(ParserServletContextJavax.class.getName()); + + // ----------------------------------------------------- Instance Variables + + + /** + * Servlet context attributes. + */ + protected Hashtable myAttributes; + + + /** + * The base FileObject (document root) for this context. + */ + protected FileObject wmRoot; + + private JspConfigDescriptor jspConfigDesc; + + private final WebModuleProvider webModuleProvider; + + /** If true, takes the data from the editor; otherwise + * from the disk. + */ + protected boolean useEditorVersion; + + + // ----------------------------------------------------------- Constructors + + + /** + * Create a new instance of this ServletContext implementation. + * + * @param wmRoot Resource base FileObject + * @param wm JspParserAPI.WebModule in which we are parsing the file - this is used to + * find the editor for objects which are open in the editor + */ + public ParserServletContextJavax(FileObject wmRoot, WebModuleProvider WebModuleProvider, boolean useEditor) { + LOGGER.log(Level.FINE, "ParserServletContext created"); + myAttributes = new Hashtable(); + this.wmRoot = wmRoot; + this.webModuleProvider = WebModuleProvider; + this.useEditorVersion = useEditor; + this.jspConfigDesc = new JspConfigDescriptor() { + + @Override + public Collection getTaglibs() { + // #197633: + WebModule webModule = webModuleProvider.getWebModule(); + if (webModule != null) { + FileObject webxml = webModule.getDeploymentDescriptor(); + if (webxml != null) { + try { + WebApp w = DDProvider.getDefault().getDDRoot(webxml); + if (w != null) { + JspConfig jc = w.getSingleJspConfig(); + if (jc != null) { + Collection result = new ArrayList(); + for (Taglib tl : jc.getTaglib()) { + result.add(new TaglibDescriptorImpl( + tl.getTaglibUri(), + tl.getTaglibLocation() + )); + } + return result; + } + } + } catch (IOException e) { + LOGGER.log(Level.FINE, "getTaglibs for " + FileUtil.toFile(webxml), e); + } catch (VersionNotSupportedException e) { + LOGGER.log(Level.FINE, "getTaglibs for " + FileUtil.toFile(webxml), e); + } + + } + } + return Collections.emptyList(); + } + + @Override + public Collection getJspPropertyGroups() { + WebModule webModule = webModuleProvider.getWebModule(); + if (webModule != null) { + FileObject webxml = webModule.getDeploymentDescriptor(); + if (webxml != null) { + try { + WebApp w = DDProvider.getDefault().getDDRoot(webxml); + if (w != null) { + JspConfig jc = w.getSingleJspConfig(); + if (jc != null) { + Collection result = new ArrayList(); + JspPropertyGroup[] jpgs = jc.getJspPropertyGroup(); + for (int i = 0; i < jpgs.length; i++) { + JspPropertyGroup jpg = jpgs[i]; + result.add(new JspPropertyGroupDescriptorImpl( + Arrays.asList(jpg.getUrlPattern()), + Boolean.toString(jpg.isElIgnored()), + jpg.getPageEncoding(), + Boolean.toString(jpg.isScriptingInvalid()), + Boolean.toString(jpg.isIsXml()), + Arrays.asList(jpg.getIncludePrelude()), + Arrays.asList(jpg.getIncludeCoda()) + )); + } + return result; + } + } + } catch (IOException e) { + LOGGER.log(Level.FINE, "getJspPropertyGroups for " + FileUtil.toFile(webxml), e); + } catch (VersionNotSupportedException e) { + LOGGER.log(Level.FINE, "getJspPropertyGroups for " + FileUtil.toFile(webxml), e); + } + + } + } + return Collections.emptyList(); + } + + }; + + setAttribute(JSP_TAGLIBRARY_CACHE, new ConcurrentHashMap()); + setAttribute(JSP_TAGFILE_JAR_URLS_CACHE, new ConcurrentHashMap()); + } + + @Override + public String getVirtualServerName() { + return ""; + } + + + private static final class TaglibDescriptorImpl implements TaglibDescriptor { + + private String uri; + private String loc; + + public TaglibDescriptorImpl(String uri, String loc) { + this.uri = uri; + this.loc = loc; + } + + @Override + public String getTaglibURI() { + return uri; + } + + @Override + public String getTaglibLocation() { + return loc; + } + } + + // --------------------------------------------------------- Public Methods + + + /** + * Return the specified context attribute, if any. + * + * @param name Name of the requested attribute + */ + public Object getAttribute(String name) { + LOGGER.log(Level.FINE, "getAttribute({0}) = {1}", new Object[]{name, myAttributes.get(name)}); + return myAttributes.get(name); + } + + + /** + * Return an enumeration of context attribute names. + */ + public Enumeration getAttributeNames() { + + return myAttributes.keys(); + + } + + + /** + * Return the servlet context for the specified path. + * + * @param uripath Server-relative path starting with '/' + */ + public ServletContext getContext(String uripath) { + + return null; + + } + + + /** + * Return the specified context initialization parameter. + * + * @param name Name of the requested parameter + */ + public String getInitParameter(String name) { + + return null; + + } + + + /** + * Return an enumeration of the names of context initialization + * parameters. + */ + public Enumeration getInitParameterNames() { + + return new Vector().elements(); + + } + + + /** + * Return the Servlet API major version number. + */ + public int getMajorVersion() { + + return 4; + + } + + + /** + * Return the MIME type for the specified filename. + * + * @param file Filename whose MIME type is requested + */ + public String getMimeType(String file) { + + return null; + + } + + + /** + * Return the Servlet API minor version number. + */ + public int getMinorVersion() { + + return 0; + + } + + + /** + * Return a request dispatcher for the specified servlet name. + * + * @param name Name of the requested servlet + */ + public RequestDispatcher getNamedDispatcher(String name) { + + return null; + + } + + /** Returns a FileObject representation of the specified context-relative + * virtual path. + */ + protected FileObject getResourceAsObject(String path) { + LOGGER.log(Level.FINE, "getResourceAsObject({0})", path); + FileObject fileObject = null; + if (wmRoot != null) { + fileObject = wmRoot.getFileObject(path); + } + WebModule webModule = webModuleProvider.getWebModule(); + if (fileObject == null && path != null && webModule != null && webModule.getWebInf() != null) { + int index = path.toLowerCase().indexOf("web-inf"); + if (index > -1) { + String newPath = path.substring(index + 7); + fileObject = webModule.getWebInf().getFileObject(newPath); + } + else { + fileObject = webModule.getWebInf().getFileObject(path); + } + } + return fileObject; + } + + + /** + * Return the real path for the specified context-relative + * virtual path. + * + * @param path The context-relative virtual path to resolve + */ + public String getRealPath(String path) { + LOGGER.log(Level.FINE, "getRealPath({0})", path); + if (!path.startsWith("/")) { + return null; + } + FileObject fo = getResourceAsObject(path); + if (fo != null) { + File ff = FileUtil.toFile(fo); + if (ff != null) { + return ff.getAbsolutePath(); + } + } + + return null; + } + + + /** + * Return a request dispatcher for the specified context-relative path. + * + * @param path Context-relative path for which to acquire a dispatcher + */ + public RequestDispatcher getRequestDispatcher(String path) { + + return null; + + } + + + /** + * Return a URL object of a resource that is mapped to the + * specified context-relative path. + * + * @param path Context-relative path of the desired resource + * + * @exception MalformedURLException if the resource path is + * not properly formed + */ + public URL getResource(String path) throws MalformedURLException { + + LOGGER.log(Level.FINE, "getResource({0})", path); + if (!path.startsWith("/")) + throw new MalformedURLException(NbBundle.getMessage(ParserServletContextJavax.class, + "EXC_PathMustStartWithSlash", path)); + + FileObject fo = getResourceAsObject(path); + if (fo == null) { + return null; + } + return URLMapper.findURL(fo, URLMapper.EXTERNAL); + + } + + + /** + * Return an InputStream allowing access to the resource at the + * specified context-relative path. + * + * @param path Context-relative path of the desired resource + */ + public InputStream getResourceAsStream(String path) { + LOGGER.log(Level.FINE, "getResourceAsStream({0})", path); + // first try from the opened editor - if fails read from file + FileObject fo = getResourceAsObject(path); + if ((fo != null) && (useEditorVersion)) { + // reading from the editor + InputStream result = getEditorInputStream(fo); + if (result != null) { + return result; + } + } + + // read from the file by default + try { + URL url = getResource(path); + if (url == null) { + return null; + } else { + return url.openStream(); + } + } catch (Throwable t) { + LOGGER.log(Level.INFO, null, t); + return null; + } + + } + + // copied from web.core because it's the only place with this method implemented + // (can be easily improved using customization interface if needed) + /** + * Returns InputStream for the file open in editor or null + * if the file is not open. + */ + private InputStream getEditorInputStream(FileObject fo) { + InputStream result = null; + EditorCookie ec = null; + try { + ec = DataObject.find(fo).getCookie(EditorCookie.class); + } catch (DataObjectNotFoundException e) { + LOGGER.log(Level.INFO, null, e); + } + if ((ec instanceof CloneableEditorSupport)) { + try { + result = ((CloneableEditorSupport) ec).getInputStream(); + } catch (IOException e) { + LOGGER.log(Level.INFO, null, e); + } + } + return result; + } + + /** + * Return the set of resource paths for the "directory" at the + * specified context path. + * + * @param path Context-relative base path + */ + public Set getResourcePaths(String path) { + + LOGGER.log(Level.FINE, "getResourcePaths({0})", path); + Set thePaths = new HashSet(); + if (!path.endsWith("/")) + path += "/"; + String basePath = getRealPath(path); + if (basePath == null) + return thePaths; + File theBaseDir = new File(basePath); + if (!theBaseDir.exists() || !theBaseDir.isDirectory()) + return thePaths; + String theFiles[] = theBaseDir.list(); + for (int i = 0; i < theFiles.length; i++) { + File testFile = new File(basePath + File.separator + theFiles[i]); + if (testFile.isFile()) + thePaths.add(path + theFiles[i]); + else if (testFile.isDirectory()) + thePaths.add(path + theFiles[i] + "/"); + } + return thePaths; + + } + + + /** + * Return descriptive information about this server. + */ + public String getServerInfo() { + + return "NB.ParserServletContext/1.0"; + + } + + + /** + * Return a null reference for the specified servlet name. + * + * @param name Name of the requested servlet + * + * @deprecated This method has been deprecated with no replacement + */ + @Deprecated + public Servlet getServlet(String name) throws ServletException { + + return null; + + } + + + /** + * Return the name of this servlet context. + */ + public String getServletContextName() { + + return getServerInfo(); + + } + + + /** + * Return an empty enumeration of servlet names. + * + * @deprecated This method has been deprecated with no replacement + */ + @Deprecated + public Enumeration getServletNames() { + + return new Vector().elements(); + + } + + + /** + * Return an empty enumeration of servlets. + * + * @deprecated This method has been deprecated with no replacement + */ + @Deprecated + public Enumeration getServlets() { + + return new Vector().elements(); + + } + + + /** + * Log the specified message. + * + * @param message The message to be logged + */ + public void log(String message) { + LOGGER.log(Level.INFO, message); + } + + + /** + * Log the specified message and exception. + * + * @param exception The exception to be logged + * @param message The message to be logged + * + * @deprecated Use log(String,Throwable) instead + */ + @Deprecated + public void log(Exception exception, String message) { + + log(message, exception); + + } + + + /** + * Log the specified message and exception. + * + * @param message The message to be logged + * @param exception The exception to be logged + */ + public void log(String message, Throwable exception) { + LOGGER.log(Level.INFO, message); + LOGGER.log(Level.INFO, null, exception); + } + + + /** + * Remove the specified context attribute. + * + * @param name Name of the attribute to remove + */ + public void removeAttribute(String name) { + myAttributes.remove(name); + + } + + + /** + * Set or replace the specified context attribute. + * + * @param name Name of the context attribute to set + * @param value Corresponding attribute value + */ + public void setAttribute(String name, Object value) { + myAttributes.put(name, value); + + } + + + public String getContextPath(){ + return ""; + } + + @Override + public int getEffectiveMajorVersion() { + return 4; + } + + @Override + public int getEffectiveMinorVersion() { + return 0; + } + + @Override + public boolean setInitParameter(String string, String string1) { + return false; + } + + @Override + public Dynamic addServlet(String string, String string1) { + return null; + } + + @Override + public Dynamic addServlet(String string, Servlet srvlt) { + return null; + } + + @Override + public Dynamic addServlet(String string, Class type) { + return null; + } + + @Override + public Dynamic addJspFile(String servletName, String jspFile) { + return null; + } + + @Override + public T createServlet(Class type) throws ServletException { + return null; + } + + @Override + public ServletRegistration getServletRegistration(String string) { + return null; + } + + @Override + public Map getServletRegistrations() { + return null; + } + + @Override + public FilterRegistration.Dynamic addFilter(String string, String string1) { + return null; + } + + @Override + public FilterRegistration.Dynamic addFilter(String string, Filter filter) { + return null; + } + + @Override + public FilterRegistration.Dynamic addFilter(String string, Class type) { + return null; + } + + @Override + public T createFilter(Class type) throws ServletException { + return null; + } + + @Override + public FilterRegistration getFilterRegistration(String string) { + return null; + } + + @Override + public Map getFilterRegistrations() { + return null; + } + + @Override + public SessionCookieConfig getSessionCookieConfig() { + return null; + } + + @Override + public void setSessionTrackingModes(Set set) { + + } + + @Override + public Set getDefaultSessionTrackingModes() { + return null; + } + + @Override + public Set getEffectiveSessionTrackingModes() { + return null; + } + + @Override + public void addListener(String string) { + + } + + @Override + public void addListener(T t) { + + } + + @Override + public void addListener(Class type) { + + } + + @Override + public T createListener(Class type) throws ServletException { + return null; + } + + @Override + public JspConfigDescriptor getJspConfigDescriptor() { + return jspConfigDesc; + } + + @Override + public ClassLoader getClassLoader() { + // !!!!! + return null; + } + + @Override + public void declareRoles(String... strings) { + + } + + @Override + public int getSessionTimeout() { + return 0; + } + + @Override + public void setSessionTimeout(int sessionTimeout) { + + } + + @Override + public String getRequestCharacterEncoding() { + return ""; + } + + @Override + public void setRequestCharacterEncoding(String encoding) { + + } + + @Override + public String getResponseCharacterEncoding() { + return ""; + } + + @Override + public void setResponseCharacterEncoding(String encoding) { + + } + + private static class JspPropertyGroupDescriptorImpl implements JspPropertyGroupDescriptor { + + private Collection urlPatterns; + private String isElIgnored; + private String pageEncoding; + private String scriptingInvalid; + private String isXml; + private Collection includePreludes; + private Collection includeCodas; + + public JspPropertyGroupDescriptorImpl(Collection urlPatterns, String isElIgnored, + String pageEncoding, String scriptingInvalid, String isXml, + Collection includePreludes, Collection includeCodas) { + this.urlPatterns = urlPatterns; + this.isElIgnored = isElIgnored; + this.pageEncoding = pageEncoding; + this.scriptingInvalid = scriptingInvalid; + this.isXml = isXml; + this.includePreludes = includePreludes; + this.includeCodas = includeCodas; + } + + + + @Override + public Collection getUrlPatterns() { + return urlPatterns; + } + + @Override + public String getElIgnored() { + return isElIgnored; + } + + @Override + public String getPageEncoding() { + return pageEncoding; + } + + @Override + public String getScriptingInvalid() { + return scriptingInvalid; + } + + @Override + public String getIsXml() { + return isXml; + } + + @Override + public Collection getIncludePreludes() { + return includePreludes; + } + + @Override + public Collection getIncludeCodas() { + return includeCodas; + } + + public String getErrorOnELNotFound() { + return "ErrorOnELNotFound"; + } + + @Override + public String getDeferredSyntaxAllowedAsLiteral() { + return "IGNORE ME - THIS VALUE IS NOT SUPPOSED TO BE USED"; // NOI18N + } + + @Override + public String getTrimDirectiveWhitespaces() { + return "IGNORE ME - THIS VALUE IS NOT SUPPOSED TO BE USED"; // NOI18N + } + + @Override + public String getDefaultContentType() { + return "IGNORE ME - THIS VALUE IS NOT SUPPOSED TO BE USED"; // NOI18N + } + + @Override + public String getBuffer() { + return "IGNORE ME - THIS VALUE IS NOT SUPPOSED TO BE USED"; // NOI18N + } + + @Override + public String getErrorOnUndeclaredNamespace() { + return "IGNORE ME - THIS VALUE IS NOT SUPPOSED TO BE USED"; // NOI18N + } + + } +} diff --git a/enterprise/web.jspparser/src/org/netbeans/modules/web/jspparser/WebModuleProvider.java b/enterprise/web.jspparser/src/org/netbeans/modules/web/jspparser/WebModuleProvider.java new file mode 100644 index 000000000000..5c4d437dea8f --- /dev/null +++ b/enterprise/web.jspparser/src/org/netbeans/modules/web/jspparser/WebModuleProvider.java @@ -0,0 +1,35 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.netbeans.modules.web.jspparser; + +import org.netbeans.modules.web.api.webmodule.WebModule; + +/** + * This interface delegates lifecycle of {@link WebModule} to the caller. + * See issue #85817 for more information. + */ +public interface WebModuleProvider { + + /** + * Get {@link WebModule} instance. + * @return {@link WebModule} instance or null if WebModule has already been garbage collected. + */ + WebModule getWebModule(); + +} diff --git a/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/DumpVisitor.java b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/DumpVisitor.java index ec381591a4f6..4dfe315fd726 100644 --- a/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/DumpVisitor.java +++ b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/DumpVisitor.java @@ -21,7 +21,6 @@ import java.util.logging.Level; import java.util.logging.Logger; -import javax.servlet.jsp.JspException; import org.xml.sax.Attributes; class DumpVisitor extends Node.Visitor { @@ -30,7 +29,7 @@ class DumpVisitor extends Node.Visitor { private int indent = 0; - private StringBuilder buf; + private final StringBuilder buf; private DumpVisitor() { super(); @@ -41,7 +40,7 @@ private DumpVisitor() { * This method provides a place to put actions that are common to * all nodes. Override this in the child visitor class if need to. */ - protected void visitCommon(Node n) throws JspException { + protected void visitCommon(Node n) { printString("\nNode [" + n.getStart() + ", " + getDisplayClassName(n.getClass().getName()) + "] "); // NOI18N } @@ -88,7 +87,7 @@ private void printAttributes(String prefix, Attributes attrs, printString(prefix, getAttributes(attrs), suffix); } - private void dumpBody(Node n) throws JspException { + private void dumpBody(Node n) { Node.Nodes page = n.getBody(); if (page != null) { indent++; @@ -98,56 +97,56 @@ private void dumpBody(Node n) throws JspException { } @Override - public void visit(Node.TagDirective n) throws JspException { + public void visit(Node.TagDirective n) { visitCommon(n); printAttributes("<%@ tag", n.getAttributes(), "%>"); // NOI18N } @Override - public void visit(Node.PageDirective n) throws JspException { + public void visit(Node.PageDirective n) { visitCommon(n); printAttributes("<%@ page", n.getAttributes(), "%>"); // NOI18N } @Override - public void visit(Node.TaglibDirective n) throws JspException { + public void visit(Node.TaglibDirective n) { visitCommon(n); printAttributes("<%@ taglib", n.getAttributes(), "%>"); // NOI18N } @Override - public void visit(Node.IncludeDirective n) throws JspException { + public void visit(Node.IncludeDirective n) { visitCommon(n); printAttributes("<%@ include", n.getAttributes(), "%>"); // NOI18N dumpBody(n); } @Override - public void visit(Node.Comment n) throws JspException { + public void visit(Node.Comment n) { visitCommon(n); printString("<%--", n.getText(), "--%>"); // NOI18N } @Override - public void visit(Node.Declaration n) throws JspException { + public void visit(Node.Declaration n) { visitCommon(n); printString("<%!", n.getText(), "%>"); // NOI18N } @Override - public void visit(Node.Expression n) throws JspException { + public void visit(Node.Expression n) { visitCommon(n); printString("<%=", n.getText(), "%>"); // NOI18N } @Override - public void visit(Node.Scriptlet n) throws JspException { + public void visit(Node.Scriptlet n) { visitCommon(n); printString("<%", n.getText(), "%>"); // NOI18N } @Override - public void visit(Node.IncludeAction n) throws JspException { + public void visit(Node.IncludeAction n) { visitCommon(n); printAttributes(""); // NOI18N dumpBody(n); @@ -155,7 +154,7 @@ public void visit(Node.IncludeAction n) throws JspException { } @Override - public void visit(Node.ForwardAction n) throws JspException { + public void visit(Node.ForwardAction n) { visitCommon(n); printAttributes(""); // NOI18N dumpBody(n); @@ -163,13 +162,13 @@ public void visit(Node.ForwardAction n) throws JspException { } @Override - public void visit(Node.GetProperty n) throws JspException { + public void visit(Node.GetProperty n) { visitCommon(n); printAttributes(""); // NOI18N } @Override - public void visit(Node.SetProperty n) throws JspException { + public void visit(Node.SetProperty n) { visitCommon(n); printAttributes(""); // NOI18N dumpBody(n); @@ -177,7 +176,7 @@ public void visit(Node.SetProperty n) throws JspException { } @Override - public void visit(Node.UseBean n) throws JspException { + public void visit(Node.UseBean n) { visitCommon(n); printAttributes(""); // NOI18N dumpBody(n); @@ -185,7 +184,7 @@ public void visit(Node.UseBean n) throws JspException { } @Override - public void visit(Node.PlugIn n) throws JspException { + public void visit(Node.PlugIn n) { visitCommon(n); printAttributes(""); // NOI18N dumpBody(n); @@ -193,7 +192,7 @@ public void visit(Node.PlugIn n) throws JspException { } @Override - public void visit(Node.ParamsAction n) throws JspException { + public void visit(Node.ParamsAction n) { visitCommon(n); printAttributes(""); // NOI18N dumpBody(n); @@ -201,7 +200,7 @@ public void visit(Node.ParamsAction n) throws JspException { } @Override - public void visit(Node.ParamAction n) throws JspException { + public void visit(Node.ParamAction n) { visitCommon(n); printAttributes(""); // NOI18N dumpBody(n); @@ -209,7 +208,7 @@ public void visit(Node.ParamAction n) throws JspException { } @Override - public void visit(Node.NamedAttribute n) throws JspException { + public void visit(Node.NamedAttribute n) { visitCommon(n); printAttributes(""); // NOI18N dumpBody(n); @@ -217,7 +216,7 @@ public void visit(Node.NamedAttribute n) throws JspException { } @Override - public void visit(Node.JspBody n) throws JspException { + public void visit(Node.JspBody n) { visitCommon(n); printAttributes(""); // NOI18N dumpBody(n); @@ -225,13 +224,13 @@ public void visit(Node.JspBody n) throws JspException { } @Override - public void visit(Node.ELExpression n) throws JspException { + public void visit(Node.ELExpression n) { visitCommon(n); printString(n.getText()); } @Override - public void visit(Node.CustomTag n) throws JspException { + public void visit(Node.CustomTag n) { visitCommon(n); printAttributes("<" + n.getQName(), n.getAttributes(), ">"); // NOI18N dumpBody(n); @@ -239,7 +238,7 @@ public void visit(Node.CustomTag n) throws JspException { } @Override - public void visit(Node.UninterpretedTag n) throws JspException { + public void visit(Node.UninterpretedTag n) { visitCommon(n); String tag = n.getQName(); printAttributes("<"+tag, n.getAttributes(), ">"); // NOI18N @@ -248,7 +247,7 @@ public void visit(Node.UninterpretedTag n) throws JspException { } @Override - public void visit(Node.InvokeAction n) throws JspException { + public void visit(Node.InvokeAction n) { visitCommon(n); printAttributes(""); // NOI18N dumpBody(n); @@ -256,7 +255,7 @@ public void visit(Node.InvokeAction n) throws JspException { } @Override - public void visit(Node.DoBodyAction n) throws JspException { + public void visit(Node.DoBodyAction n) { visitCommon(n); printAttributes(""); // NOI18N dumpBody(n); @@ -264,9 +263,9 @@ public void visit(Node.DoBodyAction n) throws JspException { } @Override - public void visit(Node.TemplateText n) throws JspException { + public void visit(Node.TemplateText n) { visitCommon(n); - printString(new String(n.getText())); + printString(n.getText()); } private void printIndent() { @@ -280,24 +279,14 @@ private String getString() { } public static String dump(Node n) { - try { - DumpVisitor dv = new DumpVisitor(); - n.accept(dv); - return dv.getString(); - } catch (JspException e) { - LOGGER.log(Level.INFO, null, e); - return e.getMessage(); - } + DumpVisitor dv = new DumpVisitor(); + n.accept(dv); + return dv.getString(); } public static String dump(Node.Nodes page) { - try { - DumpVisitor dv = new DumpVisitor(); - page.visit(dv); - return dv.getString(); - } catch (JspException e) { - LOGGER.log(Level.INFO, null, e); - return e.getMessage(); - } + DumpVisitor dv = new DumpVisitor(); + page.visit(dv); + return dv.getString(); } } diff --git a/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/ELNode.java b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/ELNode.java index f018fe519dc7..a06ada6c8062 100644 --- a/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/ELNode.java +++ b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/ELNode.java @@ -22,8 +22,6 @@ import java.util.ArrayList; import java.util.Iterator; import java.util.List; -import javax.servlet.jsp.tagext.FunctionInfo; -import javax.servlet.jsp.JspException; /** * This class defines internal representation for an EL Expression @@ -34,7 +32,7 @@ public abstract class ELNode { - public abstract void accept(Visitor v) throws JspException; + public abstract void accept(Visitor v); /** * Child classes @@ -46,13 +44,14 @@ public abstract class ELNode { */ public static class Root extends ELNode { - private ELNode.Nodes expr; + private final ELNode.Nodes expr; public Root(ELNode.Nodes expr) { this.expr = expr; } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -72,7 +71,8 @@ public Text(String text) { this.text = text; } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -92,7 +92,8 @@ public ELText(String text) { this.text = text; } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -110,16 +111,17 @@ public static class Function extends ELNode { private final String prefix; private final String name; private String uri; - private FunctionInfo functionInfo; private String methodName; private String[] parameters; + @SuppressWarnings("unused") Function(String prefix, String name) { this.prefix = prefix; this.name = name; } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -139,14 +141,6 @@ public String getUri() { return uri; } - public void setFunctionInfo(FunctionInfo f) { - this.functionInfo = f; - } - - public FunctionInfo getFunctionInfo() { - return functionInfo; - } - public void setMethodName(String methodName) { this.methodName = methodName; } @@ -155,10 +149,12 @@ public String getMethodName() { return methodName; } + @SuppressWarnings("AssignmentToCollectionOrArrayFieldFromParameter") public void setParameters(String[] parameters) { this.parameters = parameters; } + @SuppressWarnings("ReturnOfCollectionOrArrayField") public String[] getParameters() { return parameters; } @@ -172,11 +168,12 @@ public static class Nodes { /* Name used for creating a map for the functions in this EL expression, for communication to Generator. */ - String mapName = null; + private String mapName = null; + private final List list; public Nodes() { - list = new ArrayList(); + list = new ArrayList<>(); } public void add(ELNode en) { @@ -187,7 +184,7 @@ public void add(ELNode en) { * Visit the nodes in the list with the supplied visitor * @param v The visitor used */ - public void visit(Visitor v) throws JspException { + public void visit(Visitor v) { for (ELNode n: list) { n.accept(v); } @@ -198,7 +195,7 @@ public Iterator iterator() { } public boolean isEmpty() { - return list.size() == 0; + return list.isEmpty(); } /** @@ -226,17 +223,17 @@ public String getMapName() { public static class Visitor { - public void visit(Root n) throws JspException { + public void visit(Root n) { n.getExpression().visit(this); } - public void visit(Function n) throws JspException { + public void visit(Function n) { } - public void visit(Text n) throws JspException { + public void visit(Text n) { } - public void visit(ELText n) throws JspException { + public void visit(ELText n) { } } } diff --git a/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/Node.java b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/Node.java index 13cefa4b2a97..b07235732dc3 100644 --- a/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/Node.java +++ b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/Node.java @@ -19,11 +19,14 @@ package org.netbeans.modules.web.jsps.parserapi; -import java.util.*; -import javax.servlet.jsp.tagext.*; -import javax.servlet.jsp.JspException; +import java.util.Collections; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import java.util.Vector; import org.xml.sax.Attributes; -//import org.apache.jasper.compiler.tagplugin.TagPluginContext; + +import static java.util.Arrays.asList; /** @@ -37,9 +40,9 @@ * @author Shawn Bayern * @author Mark Roth */ - +@SuppressWarnings("ProtectedField") public abstract class Node { - + // BEGIN copied over from TagConstants public static final String JSP_URI = "http://java.sun.com/JSP/Page"; @@ -137,9 +140,6 @@ public abstract class Node { public static final String URN_JSPTLD = "urn:jsptld:"; // END copied over from TagConstants - - private static final VariableInfo[] ZERO_VARIABLE_INFO = { }; - protected Attributes attrs; // xmlns attributes that represent tag libraries (only in XML syntax) @@ -166,6 +166,7 @@ public abstract class Node { /** * Zero-arg Constructor. */ + @SuppressWarnings("unused") Node() { this.isDummy = true; } @@ -190,6 +191,7 @@ public abstract class Node { * @param start The location of the jsp page * @param parent The enclosing node */ + @SuppressWarnings("unused") Node(String qName, String localName, Mark start, Node parent) { this.qName = qName; this.localName = localName; @@ -306,7 +308,10 @@ public String getAttributeValue(String name) { /** * Get the attribute that is non request time expression, either - * from the attribute of the node, or from a jsp:attrbute + * from the attribute of the node, or from a jsp:attrbute + * + * @param name + * @return */ public String getTextAttribute(String name) { @@ -330,16 +335,19 @@ public String getTextAttribute(String name) { *

* This should always be called and only be called for nodes that * accept dynamic runtime attribute expressions. + * + * @param name + * @return */ public NamedAttribute getNamedAttributeNode( String name ) { NamedAttribute result = null; - + // Look for the attribute in NamedAttribute children Nodes nodes = getNamedAttributeNodes(); int numChildNodes = nodes.size(); for( int i = 0; i < numChildNodes; i++ ) { NamedAttribute na = (NamedAttribute)nodes.getNode( i ); - boolean found = false; + boolean found; int index = name.indexOf(':'); if (index != -1) { // qualified name @@ -352,7 +360,7 @@ public NamedAttribute getNamedAttributeNode( String name ) { break; } } - + return result; } @@ -370,7 +378,7 @@ public Node.Nodes getNamedAttributeNodes() { } Node.Nodes result = new Node.Nodes(); - + // Look for the attribute in NamedAttribute children Nodes nodes = getBody(); if( nodes != null ) { @@ -391,7 +399,7 @@ public Node.Nodes getNamedAttributeNodes() { namedAttributeNodes = result; return result; } - + public Nodes getBody() { return body; } @@ -434,7 +442,7 @@ public boolean isDummy() { public Node.Root getRoot() { Node n = this; - while (!(n instanceof Node.Root)) { + while ((!(n instanceof Node.Root)) && n != null) { n = n.getParent(); } return (Node.Root) n; @@ -445,7 +453,7 @@ public Node.Root getRoot() { * type. This is abstract and should be overrode by the extending classes. * @param v The visitor class */ - abstract void accept(Visitor v) throws JspException; + abstract void accept(Visitor v); //********************************************************************* @@ -470,7 +478,7 @@ private void addToParent(Node parent) { /********************************************************************* * Child classes */ - + /** * Represents the root of a Jsp page or Jsp document */ @@ -508,6 +516,7 @@ public static class Root extends Node { /* * Constructor. */ + @SuppressWarnings("unused") Root(Mark start, Node parent, boolean isXmlSyntax) { super(start, parent); this.isXmlSyntax = isXmlSyntax; @@ -516,12 +525,14 @@ public static class Root extends Node { // Figure out and set the parent root Node r = parent; - while ((r != null) && !(r instanceof Node.Root)) - r = r.getParent(); + while ((r != null) && !(r instanceof Node.Root)) { + r = r.getParent(); + } parentRoot = (Node.Root) r; } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -577,7 +588,7 @@ public Root getParentRoot() { return parentRoot; } } - + /** * Represents the root of a Jsp document (XML syntax) */ @@ -590,7 +601,8 @@ public JspRoot(String qName, Attributes attrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } } @@ -598,6 +610,7 @@ public void accept(Visitor v) throws JspException { /** * Represents a page directive */ + @SuppressWarnings("UseOfObsoleteCollectionType") public static class PageDirective extends Node { private Vector imports; @@ -611,10 +624,11 @@ public PageDirective(String qName, Attributes attrs, Attributes taglibAttrs, Mark start, Node parent) { super(qName, PAGE_DIRECTIVE_ACTION, attrs, nonTaglibXmlnsAttrs, taglibAttrs, start, parent); - imports = new Vector(); + imports = new Vector<>(); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -624,6 +638,7 @@ public void accept(Visitor v) throws JspException { * PageDirective's vector of imported classes and packages. * @param value A comma-separated string of imports. */ + @SuppressWarnings("NestedAssignment") public void addImport(String value) { int start = 0; int index; @@ -639,6 +654,7 @@ public void addImport(String value) { } } + @SuppressWarnings("ReturnOfCollectionOrArrayField") public List getImports() { return imports; } @@ -662,7 +678,8 @@ public IncludeDirective(String qName, Attributes attrs, taglibAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } } @@ -677,7 +694,8 @@ public TaglibDirective(Attributes attrs, Mark start, Node parent) { start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } } @@ -685,6 +703,7 @@ public void accept(Visitor v) throws JspException { /** * Represents a tag directive */ + @SuppressWarnings("UseOfObsoleteCollectionType") public static class TagDirective extends Node { private Vector imports; @@ -697,19 +716,21 @@ public TagDirective(String qName, Attributes attrs, Attributes taglibAttrs, Mark start, Node parent) { super(qName, TAG_DIRECTIVE_ACTION, attrs, nonTaglibXmlnsAttrs, taglibAttrs, start, parent); - imports = new Vector(); + imports = new Vector<>(); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } - + /** * Parses the comma-separated list of class or package names in the * given attribute value and adds each component to this * PageDirective's vector of imported classes and packages. * @param value A comma-separated string of imports. */ + @SuppressWarnings("NestedAssignment") public void addImport(String value) { int start = 0; int index; @@ -724,7 +745,8 @@ public void addImport(String value) { imports.add(value.substring(start).trim()); } } - + + @SuppressWarnings("ReturnOfCollectionOrArrayField") public List getImports() { return imports; } @@ -748,7 +770,8 @@ public AttributeDirective(String qName, Attributes attrs, nonTaglibXmlnsAttrs, taglibAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } } @@ -771,7 +794,8 @@ public VariableDirective(String qName, Attributes attrs, taglibAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } } @@ -792,7 +816,8 @@ public InvokeAction(String qName, Attributes attrs, taglibAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } } @@ -813,7 +838,8 @@ public DoBodyAction(String qName, Attributes attrs, taglibAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } } @@ -828,7 +854,8 @@ public Comment(String text, Mark start, Node parent) { super(null, null, text, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } } @@ -858,6 +885,7 @@ public ScriptingElement(String qName, String localName, * TemplateText nodes in its body. This method handles either case. * @return The text string */ + @Override public String getText() { String ret = text; if ((ret == null) && (body != null)) { @@ -888,7 +916,8 @@ public Declaration(String qName, Attributes nonTaglibXmlnsAttrs, taglibAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } } @@ -911,7 +940,8 @@ public Expression(String qName, Attributes nonTaglibXmlnsAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } } @@ -932,7 +962,8 @@ public Scriptlet(String qName, Attributes nonTaglibXmlnsAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } } @@ -949,7 +980,8 @@ public ELExpression(String text, Mark start, Node parent) { super(null, null, text, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -967,7 +999,7 @@ public ELNode.Nodes getEL() { */ public static class ParamAction extends Node { - JspAttribute value; + private JspAttribute value; public ParamAction(Attributes attrs, Mark start, Node parent) { this(JSP_PARAM_ACTION, attrs, null, null, start, parent); @@ -980,7 +1012,8 @@ public ParamAction(String qName, Attributes attrs, taglibAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -1010,7 +1043,8 @@ public ParamsAction(String qName, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } } @@ -1032,7 +1066,8 @@ public FallBackAction(String qName, taglibAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } } @@ -1055,7 +1090,8 @@ public IncludeAction(String qName, Attributes attrs, taglibAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -1086,7 +1122,8 @@ public ForwardAction(String qName, Attributes attrs, taglibAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -1115,7 +1152,8 @@ public GetProperty(String qName, Attributes attrs, taglibAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } } @@ -1138,7 +1176,8 @@ public SetProperty(String qName, Attributes attrs, taglibAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -1156,7 +1195,7 @@ public JspAttribute getValue() { */ public static class UseBean extends Node { - JspAttribute beanName; + private JspAttribute beanName; public UseBean(Attributes attrs, Mark start, Node parent) { this(JSP_USE_BEAN_ACTION, attrs, null, null, start, parent); @@ -1169,7 +1208,8 @@ public UseBean(String qName, Attributes attrs, taglibAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -1189,7 +1229,7 @@ public static class PlugIn extends Node { private JspAttribute width; private JspAttribute height; - + public PlugIn(Attributes attrs, Mark start, Node parent) { this(JSP_PLUGIN_ACTION, attrs, null, null, start, parent); } @@ -1201,7 +1241,8 @@ public PlugIn(String qName, Attributes attrs, taglibAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -1238,19 +1279,22 @@ public UninterpretedTag(String qName, String localName, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } + @SuppressWarnings("AssignmentToCollectionOrArrayFieldFromParameter") public void setJspAttributes(JspAttribute[] jspAttrs) { this.jspAttrs = jspAttrs; } + @SuppressWarnings("ReturnOfCollectionOrArrayField") public JspAttribute[] getJspAttributes() { return jspAttrs; } } - + /** * Represents a . */ @@ -1270,14 +1314,17 @@ public JspElement(String qName, Attributes attrs, taglibAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } + @SuppressWarnings("AssignmentToCollectionOrArrayFieldFromParameter") public void setJspAttributes(JspAttribute[] jspAttrs) { this.jspAttrs = jspAttrs; } + @SuppressWarnings("ReturnOfCollectionOrArrayField") public JspAttribute[] getJspAttributes() { return jspAttrs; } @@ -1310,14 +1357,15 @@ public JspOutput(String qName, Attributes attrs, taglibAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } } /** * Collected information about child elements. Used by nodes like - * CustomTag, JspBody, and NamedAttribute. The information is + * CustomTag, JspBody, and NamedAttribute. The information is * set in the Collector. */ public static class ChildInfo { @@ -1368,7 +1416,7 @@ public void setHasSetProperty(boolean s) { public boolean hasSetProperty() { return hasSetProperty; } - + public void setHasScriptingVars(boolean s) { hasScriptingVars = s; } @@ -1381,17 +1429,25 @@ public boolean hasScriptingVars() { /** * Represents a custom tag */ + @SuppressWarnings("UseOfObsoleteCollectionType") public static class CustomTag extends Node { + private static final Set ITERATION_TAGS = Set.of("jakarta.servlet.jsp.tagext.IterationTag", "javax.servlet.jsp.tagext.IterationTag"); + private static final Set BODY_TAGS = Set.of("jakarta.servlet.jsp.tagext.BodyTag", "javax.servlet.jsp.tagext.BodyTag"); + private static final Set TRY_CATCH_FINALLY_TAGS = Set.of("jakarta.servlet.jsp.tagext.TryCatchFinally", "javax.servlet.jsp.tagext.TryCatchFinally"); + private static final Set SIMPLE_TAGS = Set.of("jakarta.servlet.jsp.tagext.SimpleTag", "javax.servlet.jsp.tagext.SimpleTag"); + private static final Set DYNAMIC_ATTRIBUTES = Set.of("jakarta.servlet.jsp.tagext.DynamicAttributes", "javax.servlet.jsp.tagext.DynamicAttributes"); + + public static final int AT_BEGIN = 1; + public static final int AT_END = 2; + public static final int NESTED = 0; + private String uri; private String prefix; private JspAttribute[] jspAttrs; - private TagData tagData; private String tagHandlerPoolName; - private TagInfo tagInfo; - private TagFileInfo tagFileInfo; + private boolean isTagFile; private Class tagHandlerClass; - private VariableInfo[] varInfos; private int customNestingLevel; private ChildInfo childInfo; private boolean implementsIterationTag; @@ -1404,86 +1460,60 @@ public static class CustomTag extends Node { private Vector nestedScriptingVars; private Node.CustomTag customTagParent; private Integer numCount; - //private boolean useTagPlugin; - //private TagPluginContext tagPluginContext; - - /** - * The following two fields are used for holding the Java - * scriptlets that the tag plugins may generate. Meaningful - * only if useTagPlugin is true; - * Could move them into TagPluginContextImpl, but we'll need - * to cast tagPluginContext to TagPluginContextImpl all the time... - */ - //private Nodes atSTag; - //private Nodes atETag; + private Set fragmentAttributes = Collections.emptySet(); /* * Constructor for custom action implemented by tag handler. */ public CustomTag(String qName, String prefix, String localName, String uri, Attributes attrs, Mark start, Node parent, - TagInfo tagInfo, Class tagHandlerClass) { - this(qName, prefix, localName, uri, attrs, null, null, start, - parent, tagInfo, tagHandlerClass); - } - - /* - * Constructor for custom action implemented by tag handler. - */ - public CustomTag(String qName, String prefix, String localName, - String uri, Attributes attrs, - Attributes nonTaglibXmlnsAttrs, - Attributes taglibAttrs, - Mark start, Node parent, TagInfo tagInfo, Class tagHandlerClass) { - super(qName, localName, attrs, nonTaglibXmlnsAttrs, taglibAttrs, + super(qName, localName, attrs, null, null, start, parent); this.uri = uri; this.prefix = prefix; - this.tagInfo = tagInfo; this.tagHandlerClass = tagHandlerClass; this.customNestingLevel = makeCustomNestingLevel(); this.childInfo = new ChildInfo(); - this.implementsIterationTag = - IterationTag.class.isAssignableFrom(tagHandlerClass); - this.implementsBodyTag = - BodyTag.class.isAssignableFrom(tagHandlerClass); - this.implementsTryCatchFinally = - TryCatchFinally.class.isAssignableFrom(tagHandlerClass); - this.implementsSimpleTag = - SimpleTag.class.isAssignableFrom(tagHandlerClass); - this.implementsDynamicAttributes = - DynamicAttributes.class.isAssignableFrom(tagHandlerClass); + this.implementsIterationTag = derivesFrom(tagHandlerClass, ITERATION_TAGS); + this.implementsBodyTag = derivesFrom(tagHandlerClass, BODY_TAGS); + this.implementsTryCatchFinally = derivesFrom(tagHandlerClass, TRY_CATCH_FINALLY_TAGS); + this.implementsSimpleTag = derivesFrom(tagHandlerClass, SIMPLE_TAGS); + this.implementsDynamicAttributes = derivesFrom(tagHandlerClass, DYNAMIC_ATTRIBUTES); } - /* - * Constructor for custom action implemented by tag file. - */ - public CustomTag(String qName, String prefix, String localName, - String uri, Attributes attrs, Mark start, Node parent, - TagFileInfo tagFileInfo) { - this(qName, prefix, localName, uri, attrs, null, null, start, - parent, tagFileInfo); - } + private static boolean derivesFrom(Class target, Set candidates) { + if (target == null) { + return false; + } + if (candidates.contains(target.getName())) { + return true; + } + for (Class iface : target.getInterfaces()) { + if (derivesFrom(iface, candidates)) { + return true; + } + } + return derivesFrom(target.getSuperclass(), candidates); + } /* * Constructor for custom action implemented by tag file. */ public CustomTag(String qName, String prefix, String localName, String uri, Attributes attrs, - Attributes nonTaglibXmlnsAttrs, - Attributes taglibAttrs, - Mark start, Node parent, TagFileInfo tagFileInfo) { + Mark start, Node parent, boolean isTagFile, + boolean implementsDynamicAttributes, + Set fragmentAttributes) { - super(qName, localName, attrs, nonTaglibXmlnsAttrs, taglibAttrs, + super(qName, localName, attrs, null, null, start, parent); this.uri = uri; this.prefix = prefix; - this.tagFileInfo = tagFileInfo; - this.tagInfo = tagFileInfo.getTagInfo(); + this.isTagFile = isTagFile; this.customNestingLevel = makeCustomNestingLevel(); this.childInfo = new ChildInfo(); @@ -1491,10 +1521,13 @@ public CustomTag(String qName, String prefix, String localName, this.implementsBodyTag = false; this.implementsTryCatchFinally = false; this.implementsSimpleTag = true; - this.implementsDynamicAttributes = tagInfo.hasDynamicAttributes(); + this.implementsDynamicAttributes = implementsDynamicAttributes; + + this.fragmentAttributes = fragmentAttributes; } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -1512,29 +1545,19 @@ public String getPrefix() { return prefix; } + @SuppressWarnings("AssignmentToCollectionOrArrayFieldFromParameter") public void setJspAttributes(JspAttribute[] jspAttrs) { this.jspAttrs = jspAttrs; } + @SuppressWarnings("ReturnOfCollectionOrArrayField") public JspAttribute[] getJspAttributes() { return jspAttrs; } - + public ChildInfo getChildInfo() { return childInfo; } - - public void setTagData(TagData tagData) { - this.tagData = tagData; - this.varInfos = tagInfo.getVariableInfo(tagData); - if (this.varInfos == null) { - this.varInfos = ZERO_VARIABLE_INFO; - } - } - - public TagData getTagData() { - return tagData; - } public void setTagHandlerPoolName(String s) { tagHandlerPoolName = s; @@ -1544,20 +1567,12 @@ public String getTagHandlerPoolName() { return tagHandlerPoolName; } - public TagInfo getTagInfo() { - return tagInfo; - } - - public TagFileInfo getTagFileInfo() { - return tagFileInfo; - } - /* * @return true if this custom action is supported by a tag file, * false otherwise */ public boolean isTagFile() { - return tagFileInfo != null; + return isTagFile; } public Class getTagHandlerClass() { @@ -1588,14 +1603,6 @@ public boolean implementsDynamicAttributes() { return implementsDynamicAttributes; } - public TagVariableInfo[] getTagVariableInfos() { - return tagInfo.getTagVariableInfos(); - } - - public VariableInfo[] getVariableInfos() { - return varInfos; - } - public void setCustomTagParent(Node.CustomTag n) { this.customTagParent = n; } @@ -1612,18 +1619,16 @@ public Integer getNumCount() { return this.numCount; } + @SuppressWarnings("AssignmentToCollectionOrArrayFieldFromParameter") public void setScriptingVars(Vector vec, int scope) { switch (scope) { - case VariableInfo.AT_BEGIN: - this.atBeginScriptingVars = vec; - break; - case VariableInfo.AT_END: - this.atEndScriptingVars = vec; - break; - case VariableInfo.NESTED: - this.nestedScriptingVars = vec; - break; - } + case AT_BEGIN -> + this.atBeginScriptingVars = vec; + case AT_END -> + this.atEndScriptingVars = vec; + case NESTED -> + this.nestedScriptingVars = vec; + } } /* @@ -1633,17 +1638,14 @@ public void setScriptingVars(Vector vec, int scope) { public Vector getScriptingVars(int scope) { Vector vec = null; - switch (scope) { - case VariableInfo.AT_BEGIN: - vec = this.atBeginScriptingVars; - break; - case VariableInfo.AT_END: - vec = this.atEndScriptingVars; - break; - case VariableInfo.NESTED: - vec = this.nestedScriptingVars; - break; - } + switch (scope) { + case AT_BEGIN -> + vec = this.atBeginScriptingVars; + case AT_END -> + vec = this.atEndScriptingVars; + case NESTED -> + vec = this.nestedScriptingVars; + } return vec; } @@ -1659,60 +1661,23 @@ public int getCustomNestingLevel() { /** * Checks to see if the attribute of the given name is of type * JspFragment. + * + * @param name + * @return */ public boolean checkIfAttributeIsJspFragment( String name ) { - boolean result = false; + boolean result = fragmentAttributes.contains(name); - TagAttributeInfo[] attributes = tagInfo.getAttributes(); - for (int i = 0; i < attributes.length; i++) { - if (attributes[i].getName().equals(name) && - attributes[i].isFragment()) { - result = true; - break; - } - } - return result; } - /*public void setUseTagPlugin(boolean use) { - useTagPlugin = use; - } - - public boolean useTagPlugin() { - return useTagPlugin; - } - - public void setTagPluginContext(TagPluginContext tagPluginContext) { - this.tagPluginContext = tagPluginContext; - } - - public TagPluginContext getTagPluginContext() { - return tagPluginContext; - } - - public void setAtSTag(Nodes sTag) { - atSTag = sTag; - } - public Nodes getAtSTag() { - return atSTag; - } - - public void setAtETag(Nodes eTag) { - atETag = eTag; - } - - public Nodes getAtETag() { - return atETag; - }*/ - /* * Computes this custom tag's custom nesting level, which corresponds * to the number of times this custom tag is nested inside itself. * * Example: - * + * * * -- nesting level 0 * @@ -1727,7 +1692,7 @@ public Nodes getAtETag() { * * * - * + * * @return Custom tag's nesting level */ private int makeCustomNestingLevel() { @@ -1747,11 +1712,13 @@ private int makeCustomNestingLevel() { * Returns true if this custom action has an empty body, and false * otherwise. * - * A custom action is considered to have an empty body if the + * A custom action is considered to have an empty body if the * following holds true: * - getBody() returns null, or * - all immediate children are jsp:attribute actions, or * - the action's jsp:body is empty. + * + * @return */ public boolean hasEmptyBody() { boolean hasEmptyBody = true; @@ -1780,8 +1747,8 @@ public boolean hasEmptyBody() { * attribute (used by the tag plugin machinery only). */ public static class AttributeGenerator extends Node { - String name; // name of the attribute - CustomTag tag; // The tag this attribute belongs to + private String name; // name of the attribute + private CustomTag tag; // The tag this attribute belongs to public AttributeGenerator(Mark start, String name, CustomTag tag) { super(start, null); @@ -1789,7 +1756,8 @@ public AttributeGenerator(Mark start, String name, CustomTag tag) { this.tag = tag; } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -1813,7 +1781,8 @@ public JspText(String qName, Attributes nonTaglibXmlnsAttrs, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } } @@ -1828,16 +1797,16 @@ public static class NamedAttribute extends Node { // True if this node is to be trimmed, or false otherwise private boolean trim = true; - + private ChildInfo childInfo; private String name; - private String localName; private String prefix; public NamedAttribute(Attributes attrs, Mark start, Node parent) { this(JSP_ATTRIBUTE_ACTION, attrs, null, null, start, parent); } + @SuppressWarnings("OverridableMethodCallInConstructor") public NamedAttribute(String qName, Attributes attrs, Attributes nonTaglibXmlnsAttrs, Attributes taglibAttrs, @@ -1863,7 +1832,8 @@ public NamedAttribute(String qName, Attributes attrs, } } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -1871,14 +1841,10 @@ public String getName() { return this.name; } - public String getLocalName() { - return this.localName; - } - public String getPrefix() { return this.prefix; } - + public ChildInfo getChildInfo() { return this.childInfo; } @@ -1900,14 +1866,17 @@ public boolean isTrim() { * Since this method is only for attributes that are not rtexpr, * we can assume the body of the jsp:attribute is a template text. */ + @Override public String getText() { class AttributeVisitor extends Visitor { - String attrValue = null; + private String attrValue = null; + + @Override public void visit(TemplateText txt) { - attrValue = new String(txt.getText()); + attrValue = txt.getText(); } - + public String getAttrValue() { return attrValue; } @@ -1916,17 +1885,14 @@ public String getAttrValue() { // According to JSP 2.0, if the body of the // action is empty, it is equivalent of specifying "" as the value // of the attribute. - String text = ""; + String resultText = ""; if (getBody() != null) { AttributeVisitor attributeVisitor = new AttributeVisitor(); - try { - getBody().visit(attributeVisitor); - } catch (JspException e) { - } - text = attributeVisitor.getAttrValue(); + getBody().visit(attributeVisitor); + resultText = attributeVisitor.getAttrValue(); } - - return text; + + return resultText; } } @@ -1948,7 +1914,8 @@ public JspBody(String qName, Attributes nonTaglibXmlnsAttrs, this.childInfo = new ChildInfo(); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -1966,7 +1933,8 @@ public TemplateText(String text, Mark start, Node parent) { super(null, null, text, start, parent); } - public void accept(Visitor v) throws JspException { + @Override + public void accept(Visitor v) { v.visit(this); } @@ -1994,6 +1962,8 @@ public void rtrim() { /** * Returns true if this template text contains whitespace only. + * + * @return */ public boolean isAllSpace() { boolean isAllSpace = true; @@ -2034,6 +2004,7 @@ public static class JspAttribute { // The node in the parse tree for the NamedAttribute private NamedAttribute namedAttributeNode; + @SuppressWarnings("unused") JspAttribute(String qName, String uri, String localName, String value, boolean expr, ELNode.Nodes el, boolean dyn ) { this.qName = qName; @@ -2052,6 +2023,7 @@ public static class JspAttribute { * named attribute. In this case, we have to store the nodes of * the body of the attribute. */ + @SuppressWarnings("unused") JspAttribute(NamedAttribute na, boolean dyn) { this.qName = na.getName(); this.localName = na.getLocalName(); @@ -2120,10 +2092,10 @@ public boolean isNamedAttribute() { } /** - * @return true if the value represents an expression that should - * be fed to the expression interpreter - * @return false for string literals or rtexprvalues that should - * not be interpreted or reevaluated + * @return {@code true} if the value represents an expression that + * should be fed to the expression interpreter, {@code false} for string + * literals or rtexprvalues that should not be interpreted or + * reevaluated */ public boolean isELInterpreterInput() { return el != null; @@ -2139,6 +2111,8 @@ public boolean isLiteral() { /** * XXX + * + * @return */ public boolean isDynamic() { return dynamic; @@ -2153,13 +2127,14 @@ public ELNode.Nodes getEL() { * An ordered list of Node, used to represent the body of an element, or * a jsp page of jsp document. */ + @SuppressWarnings("UseOfObsoleteCollectionType") public static class Nodes { - private List list; + private final List list; private Node.Root root; // null if this is not a page public Nodes() { - list = new Vector(); + list = new Vector<>(); } public Nodes(List l) { @@ -2168,7 +2143,7 @@ public Nodes(List l) { public Nodes(Node.Root root) { this.root = root; - list = new Vector(); + list = new Vector<>(); list.add(root); } @@ -2193,7 +2168,7 @@ public void remove(Node n) { * Visit the nodes in the list with the supplied visitor * @param v The visitor used */ - public void visit(Visitor v) throws JspException { + public void visit(Visitor v) { for (Node n : list) { n.accept(v); } @@ -2211,11 +2186,12 @@ public Node getNode(int index) { } return n; } - + public Node.Root getRoot() { return root; } - + + @Override public String toString() { return DumpVisitor.dump(this); } @@ -2232,168 +2208,172 @@ public static class Visitor { /** * This method provides a place to put actions that are common to * all nodes. Override this in the child visitor class if need to. + * + * @param n */ - protected void doVisit(Node n) throws JspException { + protected void doVisit(Node n) { } /** * Visit the body of a node, using the current visitor + * + * @param n */ - protected void visitBody(Node n) throws JspException { + protected void visitBody(Node n) { if (n.getBody() != null) { n.getBody().visit(this); } } - public void visit(Root n) throws JspException { + public void visit(Root n) { doVisit(n); visitBody(n); } - public void visit(JspRoot n) throws JspException { + public void visit(JspRoot n) { doVisit(n); visitBody(n); } - public void visit(PageDirective n) throws JspException { + public void visit(PageDirective n) { doVisit(n); } - public void visit(TagDirective n) throws JspException { + public void visit(TagDirective n) { doVisit(n); } - public void visit(IncludeDirective n) throws JspException { + public void visit(IncludeDirective n) { doVisit(n); visitBody(n); } - public void visit(TaglibDirective n) throws JspException { + public void visit(TaglibDirective n) { doVisit(n); } - public void visit(AttributeDirective n) throws JspException { + public void visit(AttributeDirective n) { doVisit(n); } - public void visit(VariableDirective n) throws JspException { + public void visit(VariableDirective n) { doVisit(n); } - public void visit(Comment n) throws JspException { + public void visit(Comment n) { doVisit(n); } - public void visit(Declaration n) throws JspException { + public void visit(Declaration n) { doVisit(n); } - public void visit(Expression n) throws JspException { + public void visit(Expression n) { doVisit(n); } - public void visit(Scriptlet n) throws JspException { + public void visit(Scriptlet n) { doVisit(n); } - public void visit(ELExpression n) throws JspException { + public void visit(ELExpression n) { doVisit(n); } - public void visit(IncludeAction n) throws JspException { + public void visit(IncludeAction n) { doVisit(n); visitBody(n); } - public void visit(ForwardAction n) throws JspException { + public void visit(ForwardAction n) { doVisit(n); visitBody(n); } - public void visit(GetProperty n) throws JspException { + public void visit(GetProperty n) { doVisit(n); visitBody(n); } - public void visit(SetProperty n) throws JspException { + public void visit(SetProperty n) { doVisit(n); visitBody(n); } - public void visit(ParamAction n) throws JspException { + public void visit(ParamAction n) { doVisit(n); visitBody(n); } - public void visit(ParamsAction n) throws JspException { + public void visit(ParamsAction n) { doVisit(n); visitBody(n); } - public void visit(FallBackAction n) throws JspException { + public void visit(FallBackAction n) { doVisit(n); visitBody(n); } - public void visit(UseBean n) throws JspException { + public void visit(UseBean n) { doVisit(n); visitBody(n); } - public void visit(PlugIn n) throws JspException { + public void visit(PlugIn n) { doVisit(n); visitBody(n); } - public void visit(CustomTag n) throws JspException { + public void visit(CustomTag n) { doVisit(n); visitBody(n); } - public void visit(UninterpretedTag n) throws JspException { + public void visit(UninterpretedTag n) { doVisit(n); visitBody(n); } - public void visit(JspElement n) throws JspException { + public void visit(JspElement n) { doVisit(n); visitBody(n); } - public void visit(JspText n) throws JspException { + public void visit(JspText n) { doVisit(n); visitBody(n); } - public void visit(NamedAttribute n) throws JspException { + public void visit(NamedAttribute n) { doVisit(n); visitBody(n); } - public void visit(JspBody n) throws JspException { + public void visit(JspBody n) { doVisit(n); visitBody(n); } - public void visit(InvokeAction n) throws JspException { + public void visit(InvokeAction n) { doVisit(n); visitBody(n); } - public void visit(DoBodyAction n) throws JspException { + public void visit(DoBodyAction n) { doVisit(n); visitBody(n); } - public void visit(TemplateText n) throws JspException { + public void visit(TemplateText n) { doVisit(n); } - public void visit(JspOutput n) throws JspException { + public void visit(JspOutput n) { doVisit(n); } - public void visit(AttributeGenerator n) throws JspException { + public void visit(AttributeGenerator n) { doVisit(n); } } diff --git a/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/PageInfo.java b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/PageInfo.java index 93c1a23f1e5b..a9f9232f77b6 100644 --- a/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/PageInfo.java +++ b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/PageInfo.java @@ -20,21 +20,9 @@ package org.netbeans.modules.web.jsps.parserapi; import java.util.*; - import java.util.logging.Level; - -//import org.apache.jasper.Constants; import java.util.logging.Logger; -//import org.apache.jasper.Constants; -import javax.servlet.jsp.JspException; -import javax.servlet.jsp.PageContext; -import javax.servlet.jsp.tagext.TagInfo; -import javax.servlet.jsp.tagext.TagFileInfo; -import javax.servlet.jsp.tagext.FunctionInfo; -import javax.servlet.jsp.tagext.TagAttributeInfo; -import javax.servlet.jsp.tagext.TagLibraryInfo; - /** * A repository for various info about the translation unit under compilation. * @@ -43,29 +31,24 @@ public abstract class PageInfo { - public static final String JSP_SERVLET_BASE = "javax.servlet.http.HttpServlet"; + public static final String JSP_SERVLET_BASE = "jakarta.servlet.http.HttpServlet"; - private static Comparator TAG_FILE_INFO_COMPARATOR = new Comparator() { + private static final Comparator TAG_FILE_INFO_COMPARATOR + = (TagFileInfo o1, TagFileInfo o2) -> o1.getPath().compareTo(o2.getPath()); - @Override - public int compare(TagFileInfo o1, TagFileInfo o2) { - return o1.getPath().compareTo(o2.getPath()); - } - }; - - private List imports; - private List dependants; + private final List imports; + private final List dependants; // private BeanRepository beanRepository; private BeanData[] beans; - private Map taglibsMap; - private Map jspPrefixMapper; - private Map> xmlPrefixMapper; + private final Map taglibsMap; + private final Map jspPrefixMapper; + private final Map> xmlPrefixMapper; /** Approximate XML prefix mapper. Same as xmlPrefixMapper, but does not "forget" mappings (by popping them). */ - private Map approxXmlPrefixMapper; - private String defaultLanguage = "java"; + private final Map approxXmlPrefixMapper; + private final String defaultLanguage = "java"; private String language; - private String defaultExtends = JSP_SERVLET_BASE; + private final String defaultExtends = JSP_SERVLET_BASE; private String xtends; private String contentType = null; private String session; @@ -90,17 +73,17 @@ public int compare(TagFileInfo o1, TagFileInfo o2) { private String doctypeName = null; private String doctypePublic = null; private String doctypeSystem = null; - + private boolean isJspPrefixHijacked; // Set of all element and attribute prefixes used in this translation unit - private Set prefixes; + private final Set prefixes; private boolean hasJspRoot = false; private List includePrelude; private List includeCoda; - private List pluginDcls; // Id's for tagplugin declarations - + private final List pluginDcls; // Id's for tagplugin declarations + // Adding for obtaining informations about the parsed tag file private boolean isTagFile; private TagInfo tagInfo; @@ -110,7 +93,7 @@ public PageInfo(/*BeanRepository beanRepository*/ Map taglibsMap, Map jspPrefixMapper, Map> xmlPrefixMapper, - Map approxXmlPrefixMapper, + Map approxXmlPrefixMapper, List imports, List dependants, List includePrelude, @@ -135,6 +118,8 @@ public PageInfo(/*BeanRepository beanRepository*/ /** * Check if the plugin ID has been previously declared. Make a not * that this Id is now declared. + * + * @param id * @return true if Id has been declared. */ public boolean isPluginDeclared(String id) { @@ -152,6 +137,7 @@ public void addImport(String imp) { this.imports.add(imp); } + @SuppressWarnings("ReturnOfCollectionOrArrayField") public List getImports() { return imports; } @@ -160,7 +146,8 @@ public void addDependant(String d) { if (!dependants.contains(d)) dependants.add(d); } - + + @SuppressWarnings("ReturnOfCollectionOrArrayField") public List getDependants() { return dependants; } @@ -181,18 +168,22 @@ public boolean isScriptingInvalid() { return scriptingInvalid; } + @SuppressWarnings("ReturnOfCollectionOrArrayField") public List getIncludePrelude() { return includePrelude; } - public void setIncludePrelude(Vector prelude) { + @SuppressWarnings({"AssignmentToCollectionOrArrayFieldFromParameter", "UseOfObsoleteCollectionType"}) + public void setIncludePrelude( Vector prelude) { includePrelude = prelude; } + @SuppressWarnings("ReturnOfCollectionOrArrayField") public List getIncludeCoda() { return includeCoda; } + @SuppressWarnings({"AssignmentToCollectionOrArrayFieldFromParameter", "UseOfObsoleteCollectionType"}) public void setIncludeCoda(Vector coda) { includeCoda = coda; } @@ -249,7 +240,7 @@ public boolean isJspPrefixHijacked() { /* * Adds the given prefix to the set of prefixes of this translation unit. - * + * * @param prefix The prefix to add */ public void addPrefix(String prefix) { @@ -287,15 +278,6 @@ public TagLibraryInfo getTaglib(String uri) { return taglibsMap.get(uri); } - /* - * Gets the collection of tag libraries that are associated with a URI - * - * @return Collection of tag libraries that are associated with a URI - */ - public Collection getTaglibs() { - return taglibsMap.values(); - } - /* * Checks to see if the given URI is mapped to a tag library. * @@ -328,21 +310,22 @@ public void addPrefixMapping(String prefix, String uri) { public void pushPrefixMapping(String prefix, String uri) { LinkedList stack = xmlPrefixMapper.get(prefix); if (stack == null) { - stack = new LinkedList(); - xmlPrefixMapper.put(prefix, stack); + stack = new LinkedList<>(); + xmlPrefixMapper.put(prefix, stack); } stack.addFirst(uri); } /* - * Removes the URI at the top of the stack of URIs to which the given - * prefix is mapped. + * Removes the URI at the top of the stack of URIs to which the given + * prefix is mapped. * * @param prefix The prefix whose stack of URIs is to be popped */ + @SuppressWarnings("null") public void popPrefixMapping(String prefix) { LinkedList stack = xmlPrefixMapper.get(prefix); - if (stack == null || stack.size() == 0) { + if (stack == null || stack.isEmpty()) { // XXX throw new Exception("XXX"); } stack.removeFirst(); @@ -357,10 +340,10 @@ public void popPrefixMapping(String prefix) { */ public String getURI(String prefix) { - String uri = null; + String uri; LinkedList stack = xmlPrefixMapper.get(prefix); - if (stack == null || stack.size() == 0) { + if (stack == null || stack.isEmpty()) { uri = jspPrefixMapper.get(prefix); } else { uri = stack.getFirst(); @@ -446,20 +429,20 @@ public String getContentType() { /* * buffer */ - public void setBufferValue(String value) throws JspException { - if (value == null) + public void setBufferValue(String value) { + if (value == null) return; if ("none".equalsIgnoreCase(value)) buffer = 0; else { - if (value == null || !value.endsWith("kb")) - throw new JspException(value); + if (!value.endsWith("kb")) + throw new RuntimeException("Invalid value for bufferValue: " + value); try { Integer k = Integer.valueOf(value.substring(0, value.length()-2)); buffer = k * 1024; } catch (NumberFormatException e) { - throw new JspException(value); + throw new RuntimeException("Invalid value for bufferValue: " + value, e); } } @@ -478,8 +461,8 @@ public int getBuffer() { /* * session */ - public void setSession(String value) throws JspException { - if (value == null) + public void setSession(String value) { + if (value == null) return; if ("true".equalsIgnoreCase(value)) @@ -487,7 +470,7 @@ public void setSession(String value) throws JspException { else if ("false".equalsIgnoreCase(value)) isSession = false; else - throw new JspException(value); + throw new RuntimeException("Invalid value for session: " + value); session = value; } @@ -504,8 +487,8 @@ public boolean isSession() { /* * autoFlush */ - public void setAutoFlush(String value) throws JspException { - if (value == null) + public void setAutoFlush(String value) { + if (value == null) return; if ("true".equalsIgnoreCase(value)) @@ -513,7 +496,7 @@ public void setAutoFlush(String value) throws JspException { else if ("false".equalsIgnoreCase(value)) isAutoFlush = false; else - throw new JspException(value); + throw new RuntimeException("Invalid value for autoFlush: " + value); autoFlush = value; } @@ -530,8 +513,8 @@ public boolean isAutoFlush() { /* * isThreadSafe */ - public void setIsThreadSafe(String value) throws JspException { - if (value == null) + public void setIsThreadSafe(String value) { + if (value == null) return; if ("true".equalsIgnoreCase(value)) @@ -539,7 +522,7 @@ public void setIsThreadSafe(String value) throws JspException { else if ("false".equalsIgnoreCase(value)) isThreadSafe = false; else - throw new JspException(value); + throw new RuntimeException("Invalid value for threadSafe: " + value); isThreadSafeValue = value; } @@ -564,7 +547,7 @@ public String getInfo() { return info; } - + /* * errorPage */ @@ -580,8 +563,8 @@ public String getErrorPage() { /* * isErrorPage */ - public void setIsErrorPage(String value) throws JspException { - if (value == null) + public void setIsErrorPage(String value) { + if (value == null) return; if ("true".equalsIgnoreCase(value)) @@ -589,7 +572,7 @@ public void setIsErrorPage(String value) throws JspException { else if ("false".equalsIgnoreCase(value)) isErrorPage = false; else - throw new JspException(value); + throw new RuntimeException("Invalid value for errorPage: " + value); isErrorPageValue = value; } @@ -606,8 +589,8 @@ public boolean isErrorPage() { /* * isELIgnored */ - public void setIsELIgnored(String value) throws JspException { - if (value == null) + public void setIsELIgnored(String value) { + if (value == null) return; if ("true".equalsIgnoreCase(value)) @@ -615,7 +598,7 @@ public void setIsELIgnored(String value) throws JspException { else if ("false".equalsIgnoreCase(value)) isELIgnored = false; else { - throw new JspException(value); + throw new RuntimeException("Invalid value for elIgnored: " + value); } isELIgnoredValue = value; @@ -632,29 +615,35 @@ public String getIsELIgnored() { public boolean isELIgnored() { return isELIgnored; } - + // added in NetBeans - + + @SuppressWarnings("ReturnOfCollectionOrArrayField") public Map getTagLibraries() { return taglibsMap; } - + + @SuppressWarnings("ReturnOfCollectionOrArrayField") public Map getJspPrefixMapper() { return jspPrefixMapper; } - + + @SuppressWarnings("ReturnOfCollectionOrArrayField") public Map getXMLPrefixMapper() { return xmlPrefixMapper; } - + + @SuppressWarnings("ReturnOfCollectionOrArrayField") public Map getApproxXmlPrefixMapper() { return approxXmlPrefixMapper; } - + + @SuppressWarnings("ReturnOfCollectionOrArrayField") public BeanData[] getBeans() { return beans; } + @SuppressWarnings("AssignmentToCollectionOrArrayFieldFromParameter") public void setBeans(BeanData beans[]) { this.beans = beans; } @@ -662,34 +651,33 @@ public void setBeans(BeanData beans[]) { public boolean isTagFile() { return this.isTagFile; } - + public void setTagFile(boolean isTagFile) { this.isTagFile = isTagFile; } - + public TagInfo getTagInfo() { return this.tagInfo; } - + public void setTagInfo(TagInfo tagInfo) { this.tagInfo = tagInfo; } - - /** Returns the FunctionMapper for a particular prefix. + + /** Returns the FunctionMapper for a particular prefix. * @param currentPrefix relevant tag library prefix. If the expression to evaluate is - * inside an attribute value of a custom tag, then the prefix with which the tag's + * inside an attribute value of a custom tag, then the prefix with which the tag's * tag library is declared, should be passed in. If the expression is plain * JSP text, null should be passed in. * @return FunctionMapper relevant to the given prefix. */ //public abstract FunctionMapper getFunctionMapper(String currentPrefix); - + + @Override public String toString() { StringBuilder sb = new StringBuilder(); - String nl = "\n"; // NOI18N String indent = " "; // NOI18N - String nlIndent = nl + indent; - + sb.append("----- PageInfo -----\n"); // NOI18N sb.append(indent).append("imports:\n").append(collectionToString(imports, indent + " ")); // NOI18N sb.append(indent).append("dependants:\n").append(collectionToString(dependants, indent + " ")); // NOI18N @@ -726,7 +714,7 @@ public String toString() { } return sb.toString(); } - + private String collectionToString(Collection c, String indent) { // XXX Arrays.toString() can be sufficient StringBuilder sb = new StringBuilder(); Iterator it = c.iterator(); @@ -735,7 +723,7 @@ private String collectionToString(Collection c, String indent) { // XXX Arrays.t } return sb.toString(); } - + private String taglibsMapToString(Map m, String indent) { StringBuilder sb = new StringBuilder(); Iterator it = new TreeSet<>(m.keySet()).iterator(); @@ -746,48 +734,39 @@ private String taglibsMapToString(Map m, String indent) } return sb.toString(); } - + public String tagLibraryInfoToString(TagLibraryInfo info, String indent) { StringBuilder sb = new StringBuilder(); - sb.append(indent).append("tlibversion : ").append(getFieldByReflection("tlibversion", info)).append('\n'); // NOI18N + sb.append(indent).append("tlibversion : ").append(info.getTlibversion()).append('\n'); // NOI18N sb.append(indent).append("jspversion : ").append(info.getRequiredVersion()).append('\n'); // NOI18N sb.append(indent).append("shortname : ").append(info.getShortName()).append('\n'); // NOI18N sb.append(indent).append("urn : ").append(info.getReliableURN()).append('\n'); // NOI18N sb.append(indent).append("info : ").append(info.getInfoString()).append('\n'); // NOI18N sb.append(indent).append("uri : ").append(info.getURI()).append('\n'); // NOI18N - - TagInfo tags[] = info.getTags(); - if (tags != null) { - for (int i = 0; i < tags.length; i++) - sb.append(tagInfoToString(tags[i], indent + " ")); // NOI18N - } - - TagFileInfo tagFiles[] = info.getTagFiles().clone(); - Arrays.sort(tagFiles, TAG_FILE_INFO_COMPARATOR); - if (tagFiles != null) { - for (int i = 0; i < tagFiles.length; i++) - sb.append(tagFileToString(tagFiles[i], indent + " ")); // NOI18N + + for(TagInfo ti: info.getTags()) { + sb.append(tagInfoToString(ti, indent + " ")); // NOI18N } - - FunctionInfo functions[] = info.getFunctions(); - if (functions != null) { - for (int i = 0; i < functions.length; i++) - sb.append(functionInfoToString(functions[i], indent + " ")); // NOI18N + + List tagFiles = new ArrayList<>(info.getTagFiles()); + tagFiles.sort(TAG_FILE_INFO_COMPARATOR); + for (TagFileInfo tfi: tagFiles) { + sb.append(tagFileToString(tfi, indent + " ")); // NOI18N } - + return sb.toString(); } - + public String tagInfoToString(TagInfo tag, String indent) { StringBuilder sb = new StringBuilder(); if (tag != null) { sb.append(indent).append("tag name : ").append(tag.getTagName()).append('\n'); // NOI18N sb.append(indent).append(" class : ").append(tag.getTagClassName()).append('\n'); // NOI18N sb.append(indent).append(" attribs : ["); // NOI18N - TagAttributeInfo attrs[] = tag.getAttributes(); - for (int i = 0; i < attrs.length; i++) { - sb.append(attrs[i].getName()); - if (i < attrs.length - 1) { + List attrs = tag.getAttributes(); + for (int i = 0; i < attrs.size(); i++) { + sb.append(attrs.get(i).getName()); + if (i < attrs.size() - 1) { sb.append(", "); // NOI18N } } @@ -798,74 +777,42 @@ public String tagInfoToString(TagInfo tag, String indent) { } return sb.toString(); } - - public String functionInfoToString(FunctionInfo function, String indent) { - StringBuilder sb = new StringBuilder(); - if (function != null) { - sb.append(indent).append("function name : ").append(function.getName()).append('\n'); // NOI18N - sb.append(indent).append(" class : ").append(function.getFunctionClass()).append('\n'); // NOI18N - sb.append(indent).append(" signature: ").append(function.getFunctionSignature()).append('\n'); // NOI18N - } - else { - sb.append(indent).append("functioninfo is null\n"); // NOI18N - } - return sb.toString(); - } - + public String tagFileToString(TagFileInfo tagFile, String indent) { StringBuilder sb = new StringBuilder(); sb.append(indent).append("tagfile path : ").append(tagFile.getPath()).append('\n'); // NOI18N sb.append(tagInfoToString(tagFile.getTagInfo(), indent)); return sb.toString(); } - - private Object getFieldByReflection(String fieldName, TagLibraryInfo info) { - try { - java.lang.reflect.Field f = TagLibraryInfo.class.getDeclaredField(fieldName); - f.setAccessible(true); - return f.get(info); - } - catch (NoSuchFieldException e) { - Logger.getLogger("global").log(Level.INFO, null, e); - } - catch (IllegalAccessException e) { - Logger.getLogger("global").log(Level.INFO, null, e); - } - return null; - } - + private String beansToString(BeanData beans[], String indent) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < beans.length; i++) { sb.append(indent).append("bean : ").append(beans[i].getId()).append(", "). // NOI18N -// append(scopeToString(beans[i].getScope())).append(", "). // NOI18N append(beans[i].getClassName()).append('\n'); // NOI18N } return sb.toString(); } - -// private String scopeToString(int scope) { -// switch (scope) { -// case PageContext.PAGE_SCOPE : return "PAGE"; // NOI18N -// case PageContext.SESSION_SCOPE : return "SESSION"; // NOI18N -// case PageContext.APPLICATION_SCOPE : return "APPLICATION"; // NOI18N -// case PageContext.REQUEST_SCOPE : return "REQUEST"; // NOI18N -// } -// return " !!! "; -// } + /** Interface which describes data for beans used by this page. */ public interface BeanData { - /** Identifier of the bean in the page (variable name). */ + /** + * Identifier of the bean in the page (variable name). + * @return + */ public String getId(); - /** Returns the class name for this bean. */ + /** + * Returns the class name for this bean. + * @return + */ public String getClassName(); } // interface BeanData - // helper methods for help implement toString() + // helper methods for help implement toString() private static String mapToString(Map m, String indent) { StringBuilder sb = new StringBuilder(); Iterator it = new TreeSet<>(m.keySet()).iterator(); @@ -875,5 +822,5 @@ private static String mapToString(Map m, String indent) { } return sb.toString(); } - + } diff --git a/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/TagAttributeInfo.java b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/TagAttributeInfo.java new file mode 100644 index 000000000000..85eee4767545 --- /dev/null +++ b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/TagAttributeInfo.java @@ -0,0 +1,83 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.netbeans.modules.web.jsps.parserapi; + +public class TagAttributeInfo { + private String name; + private String typeName; + private boolean required; + private boolean fragment; + private boolean canBeRequestTime; + + public TagAttributeInfo() { + } + + public TagAttributeInfo(String name, boolean required, String typeName, boolean canBeRequestTime) { + this(name, required, typeName, canBeRequestTime, false); + } + + public TagAttributeInfo(String name, boolean required, String typeName, boolean canBeRequestTime, boolean fragment) { + this.name = name; + this.typeName = typeName; + this.required = required; + this.canBeRequestTime = canBeRequestTime; + this.fragment = fragment; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getTypeName() { + return typeName; + } + + public void setTypeName(String typeName) { + this.typeName = typeName; + } + + public boolean isRequired() { + return required; + } + + public void setRequired(boolean required) { + this.required = required; + } + + public boolean isFragment() { + return fragment; + } + + public void setFragment(boolean fragment) { + this.fragment = fragment; + } + + public boolean isCanBeRequestTime() { + return canBeRequestTime; + } + + public void setCanBeRequestTime(boolean canBeRequestTime) { + this.canBeRequestTime = canBeRequestTime; + } + +} diff --git a/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/TagFileInfo.java b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/TagFileInfo.java new file mode 100644 index 000000000000..483d861a9119 --- /dev/null +++ b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/TagFileInfo.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.netbeans.modules.web.jsps.parserapi; + +public class TagFileInfo { + private String name; + private String path; + private TagInfo tagInfo; + + public TagFileInfo() { + } + + public TagFileInfo(String name, String path, TagInfo tagInfo) { + this.name = name; + this.path = path; + this.tagInfo = tagInfo; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public TagInfo getTagInfo() { + return tagInfo; + } + + public void setTagInfo(TagInfo tagInfo) { + this.tagInfo = tagInfo; + } + +} diff --git a/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/TagInfo.java b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/TagInfo.java new file mode 100644 index 000000000000..c477caf2013b --- /dev/null +++ b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/TagInfo.java @@ -0,0 +1,127 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.netbeans.modules.web.jsps.parserapi; + +import java.util.ArrayList; +import java.util.List; + +import static java.util.Arrays.asList; + +public class TagInfo { + public static final String BODY_CONTENT_EMPTY = "empty"; + public static final String BODY_CONTENT_JSP = "JSP"; + public static final String BODY_CONTENT_SCRIPTLESS = "scriptless"; + public static final String BODY_CONTENT_TAG_DEPENDENT = "tagdependent"; + + private String displayName; + private String tagName; + private String infoString; + private String tagClassName; + private String bodyContent; + private TagLibraryInfo tagLibrary; + private final List attributes = new ArrayList<>(); + private final List variables = new ArrayList<>(); + private final List runtimeVariables = new ArrayList<>(); + + public TagInfo() { + } + + public TagInfo(String tagName, String tagClassName, String bodyContent, String infoString, TagLibraryInfo tagLibrary, Object tagExtraInfo, List attributes) { + this(tagName, tagClassName, bodyContent, infoString, tagLibrary, attributes); + } + + public TagInfo(String tagName, String tagClassName, String bodyContent, String infoString, TagLibraryInfo tagLibrary, Object tagExtraInfo, TagAttributeInfo[] attributes) { + this(tagName, tagClassName, bodyContent, infoString, tagLibrary, asList(attributes)); + } + + public TagInfo(String tagName, String tagClassName, String bodyContent, String infoString, TagLibraryInfo tagLibrary, List attributes) { + this.tagName = tagName; + this.infoString = infoString; + this.tagClassName = tagClassName; + this.bodyContent = bodyContent; + this.tagLibrary = tagLibrary; + if (attributes != null) { + this.attributes.addAll(attributes); + } + } + + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public String getTagName() { + return tagName; + } + + public void setTagName(String tagName) { + this.tagName = tagName; + } + + public String getInfoString() { + return infoString; + } + + public void setInfoString(String infoString) { + this.infoString = infoString; + } + + public String getTagClassName() { + return tagClassName; + } + + public void setTagClassName(String tagClassName) { + this.tagClassName = tagClassName; + } + + public String getBodyContent() { + return bodyContent; + } + + public void setBodyContent(String bodyContent) { + this.bodyContent = bodyContent; + } + + public TagLibraryInfo getTagLibrary() { + return tagLibrary; + } + + public void setTagLibrary(TagLibraryInfo tagLibrary) { + this.tagLibrary = tagLibrary; + } + + @SuppressWarnings("ReturnOfCollectionOrArrayField") + public List getAttributes() { + return attributes; + } + + @SuppressWarnings("ReturnOfCollectionOrArrayField") + public List getVariables() { + return variables; + } + + @SuppressWarnings("ReturnOfCollectionOrArrayField") + public List getRuntimeVariables() { + return runtimeVariables; + } + +} diff --git a/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/TagLibraryInfo.java b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/TagLibraryInfo.java new file mode 100644 index 000000000000..c5d40877e213 --- /dev/null +++ b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/TagLibraryInfo.java @@ -0,0 +1,139 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.netbeans.modules.web.jsps.parserapi; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; + +public class TagLibraryInfo { + private String shortName; + private String reliableURN; + private String infoString; + private String URI; + private String prefixString; + private String requiredVersion; + private String tlibversion; + private final List tags = new ArrayList<>(); + private final List tagFiles = new ArrayList<>(); + + public TagLibraryInfo() { + } + + public TagLibraryInfo(String shortName, String reliableURN, String infoString, String URI, String prefixString, String requiredVersion, List tags, List tagFiles) { + this.shortName = shortName; + this.reliableURN = reliableURN; + this.infoString = infoString; + this.URI = URI; + this.prefixString = prefixString; + this.requiredVersion = requiredVersion; + if (tags != null) { + this.tags.addAll(tags); + } + if (tagFiles != null) { + this.tagFiles.addAll(tagFiles); + } + } + + public TagLibraryInfo(String requiredVersion) { + this.requiredVersion = requiredVersion; + } + + public String getShortName() { + return shortName; + } + + public void setShortName(String shortName) { + this.shortName = shortName; + } + + public String getReliableURN() { + return reliableURN; + } + + public void setReliableURN(String reliableURN) { + this.reliableURN = reliableURN; + } + + public String getInfoString() { + return infoString; + } + + public void setInfoString(String infoString) { + this.infoString = infoString; + } + + public String getURI() { + return URI; + } + + public void setURI(String URI) { + this.URI = URI; + } + + public String getPrefixString() { + return prefixString; + } + + public void setPrefixString(String prefixString) { + this.prefixString = prefixString; + } + + public String getRequiredVersion() { + return requiredVersion; + } + + public void setRequiredVersion(String requiredVersion) { + this.requiredVersion = requiredVersion; + } + + public String getTlibversion() { + return tlibversion; + } + + public void setTlibversion(String tlibversion) { + this.tlibversion = tlibversion; + } + + @SuppressWarnings("ReturnOfCollectionOrArrayField") + public List getTags() { + return tags; + } + + public TagInfo getTag(String tag) { + return tags + .stream() + .filter(ti -> Objects.equals(tag, ti.getTagName())) + .findFirst() + .orElse(null); + } + + @SuppressWarnings("ReturnOfCollectionOrArrayField") + public List getTagFiles() { + return tagFiles; + } + + public TagFileInfo getTagFile(String tag) { + return tagFiles + .stream() + .filter(ti -> Objects.equals(tag, ti.getName())) + .findFirst() + .orElse(null); + } +} diff --git a/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/TagVariableInfo.java b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/TagVariableInfo.java new file mode 100644 index 000000000000..f2b408b251df --- /dev/null +++ b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/TagVariableInfo.java @@ -0,0 +1,79 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.netbeans.modules.web.jsps.parserapi; + +public class TagVariableInfo { + private String nameGiven; + private String nameFromAttribute; + private String className; + private boolean declare; + private int scope; + + public TagVariableInfo() { + } + + public TagVariableInfo(String nameGiven, String nameFromAttribute, String className, boolean declare, int scope) { + this.nameGiven = nameGiven; + this.nameFromAttribute = nameFromAttribute; + this.className = className; + this.declare = declare; + this.scope = scope; + } + + public String getNameGiven() { + return nameGiven; + } + + public void setNameGiven(String nameGiven) { + this.nameGiven = nameGiven; + } + + public String getNameFromAttribute() { + return nameFromAttribute; + } + + public void setNameFromAttribute(String nameFromAttribute) { + this.nameFromAttribute = nameFromAttribute; + } + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public boolean isDeclare() { + return declare; + } + + public void setDeclare(boolean declare) { + this.declare = declare; + } + + public int getScope() { + return scope; + } + + public void setScope(int scope) { + this.scope = scope; + } + +} diff --git a/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/VariableInfo.java b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/VariableInfo.java new file mode 100644 index 000000000000..c0cbafe16930 --- /dev/null +++ b/enterprise/web.jspparser/src/org/netbeans/modules/web/jsps/parserapi/VariableInfo.java @@ -0,0 +1,59 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.netbeans.modules.web.jsps.parserapi; + +public class VariableInfo { + private String varName; + private String className; + private boolean declare; + + public VariableInfo() { + } + + public VariableInfo(String varName, String className, boolean declare) { + this.varName = varName; + this.className = className; + this.declare = declare; + } + + public String getVarName() { + return varName; + } + + public void setVarName(String varName) { + this.varName = varName; + } + + public String getClassName() { + return className; + } + + public void setClassName(String className) { + this.className = className; + } + + public boolean isDeclare() { + return declare; + } + + public void setDeclare(boolean declare) { + this.declare = declare; + } + +} diff --git a/enterprise/web.jspparser/test/unit/data/project2/build.xml b/enterprise/web.jspparser/test/unit/data/project2/build.xml index 895c35456f7a..6edb2093c9fe 100644 --- a/enterprise/web.jspparser/test/unit/data/project2/build.xml +++ b/enterprise/web.jspparser/test/unit/data/project2/build.xml @@ -2,6 +2,11 @@ + + + + + Builds, tests, and runs the project JspParserTestProject2. @@ -21,13 +26,15 @@ -post-compile-test: called after javac compilation of JUnit tests -pre-compile-test-single: called before javac compilation of single JUnit test -post-compile-test-single: called after javac compilation of single JUunit test - -pre-dist: called before jar building - -post-dist: called after jar building + -pre-dist: called before archive building + -post-dist: called after archive building -post-clean: called after cleaning build products + -pre-run-deploy: called before deploying + -post-run-deploy: called after deploying Example of pluging an obfuscator after the compilation could look like - + @@ -43,7 +50,7 @@ init-macrodef-javac: defines macro for javac compilation init-macrodef-junit: defines macro for junit execution init-macrodef-debug: defines macro for class debugging - do-dist: jar archive building + do-dist: archive building run: execution of project javadoc-build: javadoc generation diff --git a/enterprise/web.jspparser/test/unit/data/project2/nbproject/build-impl.xml b/enterprise/web.jspparser/test/unit/data/project2/nbproject/build-impl.xml index d3a0247ce0ad..51b2f858910f 100644 --- a/enterprise/web.jspparser/test/unit/data/project2/nbproject/build-impl.xml +++ b/enterprise/web.jspparser/test/unit/data/project2/nbproject/build-impl.xml @@ -1,55 +1,62 @@ - - + --> + + + + + + + + + + + INITIALIZATION SECTION + --> - + - + - - + + - + - - - - - - + + + + + + + @@ -59,7 +66,7 @@ is divided into following sections: - + @@ -70,23 +77,161 @@ is divided into following sections: - + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + Must set src.dir Must set build.dir Must set build.web.dir @@ -98,77 +243,474 @@ is divided into following sections: Must set build.test.results.dir Must set build.classes.excludes Must set dist.war + + + + + + + + + +The Java EE server classpath is not correctly set up - server home directory is missing. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Dj2ee.server.home=<app_server_installation_directory> + + +The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file) +or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used) + - + - + - - - - + + + + + + + + + - + + + + + + + + + + + + + + + + - - - + + + + + + + + + + + + - - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + - + - + - + + + + + + + + + - - + + - + @@ -176,119 +718,211 @@ is divided into following sections: - + - + + + + + + + + + + + + + + + + - + - - - + + + + - - - - + + - + + - + + +The libs.CopyLibs.classpath property is not set up. +This property must point to +org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part +of NetBeans IDE installation and is usually located at +<netbeans_installation>/java<version>/ant/extra folder. +Either open the project in the IDE and make sure CopyLibs library +exists or setup the property manually. For example like this: + ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + pre NB7.2 profiling section; consider it deprecated + --> + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + - - - - + + + + + + - - + + + + + - + + + + + + + - + - + Must select some files in the IDE or set javac.includes - - - - - + + + + - - + + + + - + - + - + + + + + + + - + - + Must select some files in the IDE or set javac.jsp.includes - + - + + + + - + + + + - + @@ -299,254 +933,487 @@ is divided into following sections: + DIST BUILDING SECTION + --> - + + + + + + + + + + + + + + + - + - + - + - - - - - - - - - - - - + + + + + + + + - - - + + + + - + + + + - - + + - - + + - - - - - + EXECUTION SECTION + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. + + + Launching ${browse.url} + + + + + Must select one file in the IDE or set run.class + + Must select one file in the IDE or set run.class + + + + + - - - + DEBUGGING SECTION + --> + + + + + + + + + + + + + - + - + - - + - - + + + + + + + + Must select one file in the IDE or set debug.class + + + + + + + + - + Must select one file in the IDE or set debug.class - - + + Must set fix.includes - + - + - + + + + + + + + + + + + + + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + JAVADOC SECTION + --> + - + - - - - + + + + + + + + + + + + + + - + - + - + + TEST COMPILATION SECTION + --> + + - - + + - + - + Must select some files in the IDE or set javac.includes - - - - - + + - + - + + TEST EXECUTION SECTION + --> + - - + + - - Some tests failed; see details above. + + Some tests failed; see details above. - - - - + + + + - + Must select some files in the IDE or set test.includes - + - - Some tests failed; see details above. + + Some tests failed; see details above. - + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + - + + TEST DEBUGGING SECTION + --> + + Must select one file in the IDE or set test.class + + + Must select one file in the IDE or set test.class - + Must select some method in the IDE or set test.method + - + - - + + + + - + - - - + + CLEANUP SECTION + --> + + + - - + + - - - - - - - + + - - - + + + + + + - - + + diff --git a/enterprise/web.jspparser/test/unit/data/project2/nbproject/genfiles.properties b/enterprise/web.jspparser/test/unit/data/project2/nbproject/genfiles.properties index 2a1c9baa9cd9..055c9b3a10f4 100644 --- a/enterprise/web.jspparser/test/unit/data/project2/nbproject/genfiles.properties +++ b/enterprise/web.jspparser/test/unit/data/project2/nbproject/genfiles.properties @@ -1,8 +1,8 @@ -build.xml.data.CRC32=0af42350 -build.xml.script.CRC32=1a486e93 -build.xml.stylesheet.CRC32=b4cea8bf +build.xml.data.CRC32=13541a66 +build.xml.script.CRC32=59e0df66 +build.xml.stylesheet.CRC32=1707db4f@1.104.0.1 # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. -nbproject/build-impl.xml.data.CRC32=0af42350 -nbproject/build-impl.xml.script.CRC32=582eaaff -nbproject/build-impl.xml.stylesheet.CRC32=4aa29c72 +nbproject/build-impl.xml.data.CRC32=13541a66 +nbproject/build-impl.xml.script.CRC32=7c2ff5f3 +nbproject/build-impl.xml.stylesheet.CRC32=334708a0@1.104.0.1 diff --git a/enterprise/web.jspparser/test/unit/data/project2/nbproject/project.properties b/enterprise/web.jspparser/test/unit/data/project2/nbproject/project.properties index 3c47b71ef701..70de72badc07 100644 --- a/enterprise/web.jspparser/test/unit/data/project2/nbproject/project.properties +++ b/enterprise/web.jspparser/test/unit/data/project2/nbproject/project.properties @@ -19,6 +19,7 @@ dist.ear.war=${dist.dir}/${war.ear.name} dist.javadoc.dir=${dist.dir}/javadoc dist.war=${dist.dir}/${war.name} file.reference.commons-logging-api.jar=lib/commons-logging-api.jar +file.reference.jstl.jar=lib/jstl.jar file.reference.project2-src=src file.reference.standard.jar=lib/standard.jar file.reference.tags.jar=lib/tags.jar @@ -27,14 +28,15 @@ j2ee.server.type=Tomcat55 jar.compress=false javac.classpath=\ ${file.reference.standard.jar}:\ + ${file.reference.jstl.jar}:\ ${file.reference.tags.jar}:\ ${file.reference.commons-logging-api.jar} # Space-separated list of extra javac options javac.compilerargs= javac.debug=true javac.deprecation=false -javac.source=${default.javac.source} -javac.target=${default.javac.target} +javac.source=1.8 +javac.target=1.8 javac.test.classpath=\ ${javac.classpath}:\ ${build.classes.dir}:\ diff --git a/enterprise/web.jspparser/test/unit/data/project2/nbproject/project.xml b/enterprise/web.jspparser/test/unit/data/project2/nbproject/project.xml index bbef12f0e229..1a6ca15a6a24 100644 --- a/enterprise/web.jspparser/test/unit/data/project2/nbproject/project.xml +++ b/enterprise/web.jspparser/test/unit/data/project2/nbproject/project.xml @@ -6,15 +6,19 @@ JspParserTestProject2 1.6 - + ${file.reference.standard.jar} WEB-INF/lib - + + ${file.reference.jstl.jar} + WEB-INF/lib + + ${file.reference.tags.jar} WEB-INF/lib - + ${file.reference.commons-logging-api.jar} WEB-INF/lib diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/build.xml b/enterprise/web.jspparser/test/unit/data/project2_jakarta/build.xml new file mode 100644 index 000000000000..6ddc61309497 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/build.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + Builds, tests, and runs the project JspParserTestProject2 (Jakarta). + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/nbproject/ant-deploy.xml b/enterprise/web.jspparser/test/unit/data/project2_jakarta/nbproject/ant-deploy.xml new file mode 100644 index 000000000000..353491d96e0c --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/nbproject/ant-deploy.xml @@ -0,0 +1,131 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/nbproject/build-impl.xml b/enterprise/web.jspparser/test/unit/data/project2_jakarta/nbproject/build-impl.xml new file mode 100644 index 000000000000..0c349a900c60 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/nbproject/build-impl.xml @@ -0,0 +1,1417 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set src.dir + Must set build.dir + Must set build.web.dir + Must set build.generated.dir + Must set dist.dir + Must set build.classes.dir + Must set dist.javadoc.dir + Must set build.test.classes.dir + Must set build.test.results.dir + Must set build.classes.excludes + Must set dist.war + + + + + + + + + +The Java EE server classpath is not correctly set up - server home directory is missing. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Dj2ee.server.home=<app_server_installation_directory> + + +The Java EE server classpath is not correctly set up. Your active server type is ${j2ee.server.type}. +Either open the project in the IDE and assign the server or setup the server classpath manually. +For example like this: + ant -Duser.properties.file=<path_to_property_file> (where you put the property "j2ee.platform.classpath" in a .properties file) +or ant -Dj2ee.platform.classpath=<server_classpath> (where no properties file is used) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + No tests executed. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +The libs.CopyLibs.classpath property is not set up. +This property must point to +org-netbeans-modules-java-j2seproject-copylibstask.jar file which is part +of NetBeans IDE installation and is usually located at +<netbeans_installation>/java<version>/ant/extra folder. +Either open the project in the IDE and make sure CopyLibs library +exists or setup the property manually. For example like this: + ant -Dlibs.CopyLibs.classpath=a/path/to/org-netbeans-modules-java-j2seproject-copylibstask.jar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must set JVM to use for profiling in profiler.info.jvm + Must set profiler agent JVM arguments in profiler.info.jvmargs.agent + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + Must select a file in the IDE or set jsp.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Browser not found, cannot launch the deployed application. Try to set the BROWSER environment variable. + + + Launching ${browse.url} + + + + + + Must select one file in the IDE or set run.class + + + + Must select one file in the IDE or set run.class + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + + + + + + + + Must select one file in the IDE or set debug.class + + + + + Must set fix.includes + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This target only works when run from inside the NetBeans IDE. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Must select some files in the IDE or set javac.includes + + + + + + + + + + + + + + + + + Some tests failed; see details above. + + + + + + + + + Must select some files in the IDE or set test.includes + + + + Some tests failed; see details above. + + + + Must select some files in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + Some tests failed; see details above. + + + + + Must select one file in the IDE or set test.class + + + + Must select one file in the IDE or set test.class + Must select some method in the IDE or set test.method + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/nbproject/genfiles.properties b/enterprise/web.jspparser/test/unit/data/project2_jakarta/nbproject/genfiles.properties new file mode 100644 index 000000000000..4c9fcf7119e4 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/nbproject/genfiles.properties @@ -0,0 +1,8 @@ +build.xml.data.CRC32=e6fe4f8e +build.xml.script.CRC32=db3ef63c +build.xml.stylesheet.CRC32=1707db4f@1.104.0.1 +# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. +# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. +nbproject/build-impl.xml.data.CRC32=e6fe4f8e +nbproject/build-impl.xml.script.CRC32=1440cdfb +nbproject/build-impl.xml.stylesheet.CRC32=334708a0@1.104.0.1 diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/nbproject/project.properties b/enterprise/web.jspparser/test/unit/data/project2_jakarta/nbproject/project.properties new file mode 100644 index 000000000000..dc8913716b94 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/nbproject/project.properties @@ -0,0 +1,90 @@ +annotation.processing.enabled=true +annotation.processing.enabled.in.editor=true +annotation.processing.processors.list= +annotation.processing.run.all.processors=true +annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +build.classes.dir=${build.web.dir}/WEB-INF/classes +build.classes.excludes=**/*.java,**/*.form +build.dir=build +build.generated.dir=${build.dir}/generated +build.generated.sources.dir=${build.dir}/generated-sources +build.test.classes.dir=${build.dir}/test/classes +build.test.results.dir=${build.dir}/test/results +build.web.dir=${build.dir}/web +build.web.excludes=${build.classes.excludes} +client.urlPart= +compile.jsps=false +debug.classpath=${javac.classpath}:${build.classes.dir} +debug.test.classpath=\ + ${run.test.classpath} +display.browser=true +dist.dir=dist +dist.ear.war=${dist.dir}/${war.ear.name} +dist.javadoc.dir=${dist.dir}/javadoc +dist.war=${dist.dir}/${war.name} +excludes= +file.reference.commons-logging-api.jar=lib/commons-logging-api.jar +file.reference.jstl.jar=lib/jstl.jar +file.reference.project2-src=src +file.reference.standard.jar=lib/standard.jar +file.reference.tags.jar=lib/tags.jar +includes=** +j2ee.compile.on.save=false +j2ee.copy.static.files.on.save=false +j2ee.deploy.on.save=false +j2ee.platform=9.0-web +j2ee.platform.classpath= +j2ee.platform.embeddableejb.classpath=${j2ee.server.home}/lib/embedded/glassfish-embedded-static-shell.jar +j2ee.platform.wscompile.classpath=${j2ee.server.home}/modules/webservices-osgi.jar +j2ee.platform.wsgen.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar +j2ee.platform.wsimport.classpath=${j2ee.server.home}/modules/webservices-osgi.jar:${j2ee.server.home}/modules/webservices-api-osgi.jar:${j2ee.server.home}/modules/jaxb-osgi.jar +j2ee.platform.wsit.classpath= +j2ee.server.type=pfv5ee8 +jar.compress=false +javac.classpath=\ + ${file.reference.standard.jar}:\ + ${file.reference.jstl.jar}:\ + ${file.reference.tags.jar}:\ + ${file.reference.commons-logging-api.jar} +# Space-separated list of extra javac options +javac.compilerargs= +javac.debug=true +javac.deprecation=false +javac.processorpath=${javac.classpath} +javac.source=17 +javac.target=17 +javac.test.classpath=\ + ${javac.classpath}:\ + ${build.classes.dir}:\ + ${libs.junit.classpath} +javac.test.processorpath=${javac.test.classpath} +javadoc.additionalparam= +javadoc.author=false +javadoc.encoding= +javadoc.noindex=false +javadoc.nonavbar=false +javadoc.notree=false +javadoc.preview=true +javadoc.private=false +javadoc.splitindex=true +javadoc.use=true +javadoc.version=false +javadoc.windowtitle= +jspcompilation.classpath=${jspc.classpath}:${javac.classpath} +lib.dir=lib +persistence.xml.dir=${conf.dir} +platform.active=default_platform +run.test.classpath=\ + ${javac.test.classpath}:\ + ${build.test.classes.dir} +# Space-separated list of JVM arguments used when running class with main method +# (you may also define separate properties like run-sys-prop.name=value instead of -Dname=value): +runmain.jvmargs= +source.root=. +src.dir=${file.reference.project2-src} +test.src.dir= +war.content.additional= +war.ear.name=JspParserTestProject2.war +war.name=JspParserTestProject2.war +web.docbase.dir=web +webinf.dir=web/WEB-INF diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/nbproject/project.xml b/enterprise/web.jspparser/test/unit/data/project2_jakarta/nbproject/project.xml new file mode 100644 index 000000000000..d7f951321349 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/nbproject/project.xml @@ -0,0 +1,29 @@ + + + org.netbeans.modules.web.project + + + JspParserTestProject2 (Jakarta) + 1.6 + + + ${file.reference.standard.jar} + WEB-INF/lib + + + ${file.reference.tags.jar} + WEB-INF/lib + + + ${file.reference.commons-logging-api.jar} + WEB-INF/lib + + + + + + + + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/outside/outsidewm.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/outside/outsidewm.jsp new file mode 100644 index 000000000000..c7f19b9e4712 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/outside/outsidewm.jsp @@ -0,0 +1,5 @@ + + +This is something. + +<% out.println(request.getParameter("hello")); %> diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/src/Bundle.properties b/enterprise/web.jspparser/test/unit/data/project2_jakarta/src/Bundle.properties new file mode 100644 index 000000000000..098d92fecaed --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/src/Bundle.properties @@ -0,0 +1,7 @@ +title=English Title +message=Some text in English +company=Midnight Cookie Company +cookies=Cookies +parameters=Parameters +localized=Localized +home=Home diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/src/Bundle_fr.properties b/enterprise/web.jspparser/test/unit/data/project2_jakarta/src/Bundle_fr.properties new file mode 100644 index 000000000000..ace23a03b0ef --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/src/Bundle_fr.properties @@ -0,0 +1,7 @@ +title=Et maintenant en Fran\u00E7ais +message=Mais qu'est-ce que tu veux encore??? +company=Midnight Cookie Company +cookies=Cookies +parameters=Parametres +localized=Traduit +home=Point d'entree diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/src/Bundle_sv.properties b/enterprise/web.jspparser/test/unit/data/project2_jakarta/src/Bundle_sv.properties new file mode 100644 index 000000000000..116f714a066a --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/src/Bundle_sv.properties @@ -0,0 +1,7 @@ +title=Svensk titel +message=Är det bara du igen? +company=Midnight Cookie Company +cookies=Cookies +parameters=Parametrar +localized=Oversatt +home=Startsida diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/src/more_for_test/TestBean.java b/enterprise/web.jspparser/test/unit/data/project2_jakarta/src/more_for_test/TestBean.java new file mode 100644 index 000000000000..5028eca5e7e3 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/src/more_for_test/TestBean.java @@ -0,0 +1,54 @@ +/* + * Sun Public License Notice + * + * The contents of this file are subject to the Sun Public License + * Version 1.0 (the "License"). You may not use this file except in + * compliance with the License. A copy of the License is available at + * http://www.sun.com/ + * + * The Original Code is NetBeans. The Initial Developer of the Original + * Code is Sun Microsystems, Inc. Portions Copyright 1997-2002 Sun + * Microsystems, Inc. All Rights Reserved. + */ + +package more_for_test; + +import java.beans.*; + +/** + * + * @author pj97932 + */ +public class TestBean extends Object implements java.io.Serializable { + + private static final String PROP_SAMPLE_PROPERTY = "SampleProperty"; + + private String sampleProperty; + + private PropertyChangeSupport propertySupport; + + /** Creates new TestBean */ + public TestBean() { + propertySupport = new PropertyChangeSupport( this ); + } + + public String getSampleProperty() { + return sampleProperty; + } + + public void setSampleProperty(String value) { + String oldValue = sampleProperty; + sampleProperty = value; + propertySupport.firePropertyChange(PROP_SAMPLE_PROPERTY, oldValue, sampleProperty); + } + + + public void addPropertyChangeListener(PropertyChangeListener listener) { + propertySupport.addPropertyChangeListener(listener); + } + + public void removePropertyChangeListener(PropertyChangeListener listener) { + propertySupport.removePropertyChangeListener(listener); + } + +} diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/META-INF/context.xml b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/META-INF/context.xml new file mode 100644 index 000000000000..2b53a8b35bd8 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/MANIFEST.MF b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/MANIFEST.MF new file mode 100644 index 000000000000..d4ea871eed07 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Created-By: Ant 1.4.1 + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/c-rt.tld b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/c-rt.tld new file mode 100644 index 000000000000..2203657f5bc0 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/c-rt.tld @@ -0,0 +1,393 @@ + + + + 1.0 + 1.2 + c_rt + http://java.sun.com/jstl/core_rt + JSTL core RT + JSTL 1.0 core library + + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + Provides core validation features for JSTL tags. + + + + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + Catches any Throwable that occurs in its body and optionally + exposes it. + + + var + false + false + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + if + org.apache.taglibs.standard.tag.rt.core.IfTag + JSP + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + + test + true + true + boolean + + + var + false + false + + + scope + false + false + + + + + import + org.apache.taglibs.standard.tag.rt.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + + url + true + true + + + var + false + false + + + scope + false + false + + + varReader + false + false + + + context + false + true + + + charEncoding + false + true + + + + + forEach + org.apache.taglibs.standard.tag.rt.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + + items + false + true + java.lang.Object + + + begin + false + true + int + + + end + false + true + int + + + step + false + true + int + + + var + false + false + + + varStatus + false + false + + + + + forTokens + org.apache.taglibs.standard.tag.rt.core.ForTokensTag + JSP + + Iterates over tokens, separated by the supplied delimeters + + + items + true + true + java.lang.String + + + delims + true + true + java.lang.String + + + begin + false + true + int + + + end + false + true + int + + + step + false + true + int + + + var + false + false + + + varStatus + false + false + + + + + out + org.apache.taglibs.standard.tag.rt.core.OutTag + JSP + + Like <%= ... >, but for expressions. + + + value + true + true + + + default + false + true + + + escapeXml + false + true + + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.rt.core.ParamTag + JSP + + Adds a parameter to a containing 'import' tag's URL. + + + name + true + true + + + value + false + true + + + + + redirect + org.apache.taglibs.standard.tag.rt.core.RedirectTag + JSP + + Redirects to a new URL. + + + var + false + false + + + scope + false + false + + + url + false + true + + + context + false + true + + + + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + Removes a scoped variable (from a particular scope, if specified). + + + var + true + false + + + scope + false + false + + + + + set + org.apache.taglibs.standard.tag.rt.core.SetTag + JSP + + Sets the result of an expression evaluation in a 'scope' + + + var + false + false + + + value + false + true + + + target + false + true + + + property + false + true + + + scope + false + false + + + + + url + org.apache.taglibs.standard.tag.rt.core.UrlTag + JSP + + Creates a URL with optional query parameters. + + + var + false + false + + + scope + false + false + + + value + false + true + + + context + false + true + + + + + when + org.apache.taglibs.standard.tag.rt.core.WhenTag + JSP + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + + test + true + true + boolean + + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/c.tld b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/c.tld new file mode 100644 index 000000000000..9c137b34ac26 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/c.tld @@ -0,0 +1,416 @@ + + + + 1.0 + 1.2 + c + http://java.sun.com/jstl/core + JSTL core + JSTL 1.0 core library + + + + org.apache.taglibs.standard.tlv.JstlCoreTLV + + + expressionAttributes + + out:value + out:default + out:escapeXml + if:test + import:url + import:context + import:charEncoding + forEach:items + forEach:begin + forEach:end + forEach:step + forTokens:items + forTokens:begin + forTokens:end + forTokens:step + param:encode + param:name + param:value + redirect:context + redirect:url + set:property + set:target + set:value + url:context + url:value + when:test + + + Whitespace-separated list of colon-separated token pairs + describing tag:attribute combinations that accept expressions. + The validator uses this information to determine which + attributes need their syntax validated. + + + + + + catch + org.apache.taglibs.standard.tag.common.core.CatchTag + JSP + + Catches any Throwable that occurs in its body and optionally + exposes it. + + + var + false + false + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + out + org.apache.taglibs.standard.tag.el.core.OutTag + JSP + + Like <%= ... >, but for expressions. + + + value + true + false + + + default + false + false + + + escapeXml + false + false + + + + + if + org.apache.taglibs.standard.tag.el.core.IfTag + JSP + + Simple conditional tag, which evalutes its body if the + supplied condition is true and optionally exposes a Boolean + scripting variable representing the evaluation of this condition + + + test + true + false + + + var + false + false + + + scope + false + false + + + + + import + org.apache.taglibs.standard.tag.el.core.ImportTag + org.apache.taglibs.standard.tei.ImportTEI + JSP + + Retrieves an absolute or relative URL and exposes its contents + to either the page, a String in 'var', or a Reader in 'varReader'. + + + url + true + false + + + var + false + false + + + scope + false + false + + + varReader + false + false + + + context + false + false + + + charEncoding + false + false + + + + + forEach + org.apache.taglibs.standard.tag.el.core.ForEachTag + org.apache.taglibs.standard.tei.ForEachTEI + JSP + + The basic iteration tag, accepting many different + collection types and supporting subsetting and other + functionality + + + items + false + false + + + begin + false + false + + + end + false + false + + + step + false + false + + + var + false + false + + + varStatus + false + false + + + + + forTokens + org.apache.taglibs.standard.tag.el.core.ForTokensTag + JSP + + Iterates over tokens, separated by the supplied delimeters + + + items + true + false + + + delims + true + false + + + begin + false + false + + + end + false + false + + + step + false + false + + + var + false + false + + + varStatus + false + false + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.el.core.ParamTag + JSP + + Adds a parameter to a containing 'import' tag's URL. + + + name + true + false + + + value + false + false + + + + + redirect + org.apache.taglibs.standard.tag.el.core.RedirectTag + JSP + + Redirects to a new URL. + + + var + false + false + + + scope + false + false + + + url + false + false + + + context + false + false + + + + + remove + org.apache.taglibs.standard.tag.common.core.RemoveTag + empty + + Removes a scoped variable (from a particular scope, if specified). + + + var + true + false + + + scope + false + false + + + + + set + org.apache.taglibs.standard.tag.el.core.SetTag + JSP + + Sets the result of an expression evaluation in a 'scope' + + + var + false + false + + + value + false + false + + + target + false + false + + + property + false + false + + + scope + false + false + + + + + url + org.apache.taglibs.standard.tag.el.core.UrlTag + JSP + + Prints or exposes a URL with optional query parameters + (via the c:param tag). + + + var + false + false + + + scope + false + false + + + value + false + false + + + context + false + false + + + + + when + org.apache.taglibs.standard.tag.el.core.WhenTag + JSP + + Subtag of <choose> that includes its body if its + condition evalutes to 'true' + + + test + true + false + + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/context.xml b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/context.xml new file mode 100644 index 000000000000..c5830e3b4b94 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/context.xml @@ -0,0 +1,2 @@ + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/fmt-rt.tld b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/fmt-rt.tld new file mode 100644 index 000000000000..45d15453e07f --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/fmt-rt.tld @@ -0,0 +1,403 @@ + + + + 1.0 + 1.2 + fmt_rt + http://java.sun.com/jstl/fmt_rt + JSTL fmt RT + JSTL 1.0 i18n-capable formatting library + + + + org.apache.taglibs.standard.tlv.JstlFmtTLV + + + Provides core validation features for JSTL tags. + + + + + requestEncoding + org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag + empty + + Sets the request character encoding + + + value + false + true + + + + + setLocale + org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag + empty + + Stores the given locale in the locale configuration variable + + + value + true + true + + + variant + false + true + + + scope + false + false + + + + + timeZone + org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag + JSP + + Specifies the time zone for any time formatting or parsing actions + nested in its body + + + value + true + true + + + + + setTimeZone + org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag + empty + + Stores the given time zone in the time zone configuration variable + + + value + true + true + + + var + false + false + + + scope + false + false + + + + + bundle + org.apache.taglibs.standard.tag.rt.fmt.BundleTag + JSP + + Loads a resource bundle to be used by its tag body + + + basename + true + true + + + prefix + false + true + + + + + setBundle + org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag + empty + + Loads a resource bundle and stores it in the named scoped variable or + the bundle configuration variable + + + basename + true + true + + + var + false + false + + + scope + false + false + + + + + message + org.apache.taglibs.standard.tag.rt.fmt.MessageTag + JSP + + Maps key to localized message and performs parametric replacement + + + key + false + true + + + bundle + false + true + + + var + false + false + + + scope + false + false + + + + + param + org.apache.taglibs.standard.tag.rt.fmt.ParamTag + JSP + + Supplies an argument for parametric replacement to a containing + <message> tag + + + value + false + true + + + + + formatNumber + org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag + JSP + + Formats a numeric value as a number, currency, or percentage + + + value + false + true + + + type + false + true + + + pattern + false + true + + + currencyCode + false + true + + + currencySymbol + false + true + + + groupingUsed + false + true + + + maxIntegerDigits + false + true + + + minIntegerDigits + false + true + + + maxFractionDigits + false + true + + + minFractionDigits + false + true + + + var + false + false + + + scope + false + false + + + + + parseNumber + org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag + JSP + + Parses the string representation of a number, currency, or percentage + + + value + false + true + + + type + false + true + + + pattern + false + true + + + parseLocale + false + true + + + integerOnly + false + true + + + var + false + false + + + scope + false + false + + + + + formatDate + org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag + empty + + Formats a date and/or time using the supplied styles and pattern + + + value + true + true + + + type + false + true + + + dateStyle + false + true + + + timeStyle + false + true + + + pattern + false + true + + + timeZone + false + true + + + var + false + false + + + scope + false + false + + + + + parseDate + org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag + JSP + + Parses the string representation of a date and/or time + + + value + false + true + + + type + false + true + + + dateStyle + false + true + + + timeStyle + false + true + + + pattern + false + true + + + timeZone + false + true + + + parseLocale + false + true + + + var + false + false + + + scope + false + false + + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/fmt.tld b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/fmt.tld new file mode 100644 index 000000000000..20523ee61932 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/fmt.tld @@ -0,0 +1,442 @@ + + + + 1.0 + 1.2 + fmt + http://java.sun.com/jstl/fmt + JSTL fmt + JSTL 1.0 i18n-capable formatting library + + + + org.apache.taglibs.standard.tlv.JstlFmtTLV + + + expressionAttributes + + requestEncoding:value + setLocale:value + setLocale:variant + timeZone:value + setTimeZone:value + bundle:basename + bundle:prefix + setBundle:basename + message:key + message:bundle + param:value + formatNumber:value + formatNumber:pattern + formatNumber:currencyCode + formatNumber:currencySymbol + formatNumber:groupingUsed + formatNumber:maxIntegerDigits + formatNumber:minIntegerDigits + formatNumber:maxFractionDigits + formatNumber:minFractionDigits + parseNumber:value + parseNumber:pattern + parseNumber:parseLocale + parseNumber:integerOnly + formatDate:value + formatDate:pattern + formatDate:timeZone + parseDate:value + parseDate:pattern + parseDate:timeZone + parseDate:parseLocale + + + Whitespace-separated list of colon-separated token pairs + describing tag:attribute combinations that accept expressions. + The validator uses this information to determine which + attributes need their syntax validated. + + + + + + requestEncoding + org.apache.taglibs.standard.tag.el.fmt.RequestEncodingTag + empty + + Sets the request character encoding + + + value + false + false + + + + + setLocale + org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag + empty + + Stores the given locale in the locale configuration variable + + + value + true + false + + + variant + false + false + + + scope + false + false + + + + + timeZone + org.apache.taglibs.standard.tag.el.fmt.TimeZoneTag + JSP + + Specifies the time zone for any time formatting or parsing actions + nested in its body + + + value + true + false + + + + + setTimeZone + org.apache.taglibs.standard.tag.el.fmt.SetTimeZoneTag + empty + + Stores the given time zone in the time zone configuration variable + + + value + true + false + + + var + false + false + + + scope + false + false + + + + + bundle + org.apache.taglibs.standard.tag.el.fmt.BundleTag + JSP + + Loads a resource bundle to be used by its tag body + + + basename + true + false + + + prefix + false + false + + + + + setBundle + org.apache.taglibs.standard.tag.el.fmt.SetBundleTag + empty + + Loads a resource bundle and stores it in the named scoped variable or + the bundle configuration variable + + + basename + true + false + + + var + false + false + + + scope + false + false + + + + + message + org.apache.taglibs.standard.tag.el.fmt.MessageTag + JSP + + Maps key to localized message and performs parametric replacement + + + key + false + false + + + bundle + false + false + + + var + false + false + + + scope + false + false + + + + + param + org.apache.taglibs.standard.tag.el.fmt.ParamTag + JSP + + Supplies an argument for parametric replacement to a containing + <message> tag + + + value + false + false + + + + + formatNumber + org.apache.taglibs.standard.tag.el.fmt.FormatNumberTag + JSP + + Formats a numeric value as a number, currency, or percentage + + + value + false + false + + + type + false + false + + + pattern + false + false + + + currencyCode + false + false + + + currencySymbol + false + false + + + groupingUsed + false + false + + + maxIntegerDigits + false + false + + + minIntegerDigits + false + false + + + maxFractionDigits + false + false + + + minFractionDigits + false + false + + + var + false + false + + + scope + false + false + + + + + parseNumber + org.apache.taglibs.standard.tag.el.fmt.ParseNumberTag + JSP + + Parses the string representation of a number, currency, or percentage + + + value + false + false + + + type + false + false + + + pattern + false + false + + + parseLocale + false + false + + + integerOnly + false + false + + + var + false + false + + + scope + false + false + + + + + formatDate + org.apache.taglibs.standard.tag.el.fmt.FormatDateTag + empty + + Formats a date and/or time using the supplied styles and pattern + + + value + true + false + + + type + false + false + + + dateStyle + false + false + + + timeStyle + false + false + + + pattern + false + false + + + timeZone + false + false + + + var + false + false + + + scope + false + false + + + + + parseDate + org.apache.taglibs.standard.tag.el.fmt.ParseDateTag + JSP + + Parses the string representation of a date and/or time + + + value + false + false + + + type + false + false + + + dateStyle + false + false + + + timeStyle + false + false + + + pattern + false + false + + + timeZone + false + false + + + parseLocale + false + false + + + var + false + false + + + scope + false + false + + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/permittedTaglibs.tld b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/permittedTaglibs.tld new file mode 100644 index 000000000000..cb9aea4477ca --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/permittedTaglibs.tld @@ -0,0 +1,42 @@ + + + + 1.0 + 1.2 + permittedTaglibs + http://jakarta.apache.org/taglibs/standard/permittedTaglibs + + Validates JSP pages to restrict 'taglib' directives + + + + + javax.servlet.jsp.jstl.tlv.PermittedTaglibsTLV + + + permittedTaglibs + + http://java.sun.com/jstl/core + http://java.sun.com/jstl/fmt + http://java.sun.com/jstl/sql + http://java.sun.com/jstl/xml + + + Whitespace-separated list of taglib URIs to permit. This example + TLD for the Standard Taglib allows only JSTL 'el' taglibs to be + imported. + + + + + + + + noop + javax.servlet.jsp.tagext.TagSupport + empty + Does nothing. + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/scriptfree.tld b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/scriptfree.tld new file mode 100644 index 000000000000..393b1c696d6f --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/scriptfree.tld @@ -0,0 +1,60 @@ + + + + 1.0 + 1.2 + scriptfree + http://jakarta.apache.org/taglibs/standard/scriptfree + + Validates JSP pages to prohibit use of scripting elements. + + + + + javax.servlet.jsp.jstl.tlv.ScriptFreeTLV + + + allowDeclarations + false + + Controls whether or not declarations are considered valid. + + + + allowScriptlets + false + + Controls whether or not scriptlets are considered valid. + + + + allowExpressions + false + + Controls whether or not top-level expressions are considered valid. + + + + allowRTExpressions + false + + Controls whether or not expressions used to supply request-time + attribute values are considered valid. + + + + Validates prohibitions against scripting elements. + + + + + + + noop + javax.servlet.jsp.tagext.TagSupport + empty + Does nothing. + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/sql-rt.tld b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/sql-rt.tld new file mode 100644 index 000000000000..a6c32657fb7c --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/sql-rt.tld @@ -0,0 +1,188 @@ + + + + 1.0 + 1.2 + sql_rt + http://java.sun.com/jstl/sql_rt + JSTL sql RT + JSTL 1.0 sql library + + + + org.apache.taglibs.standard.tlv.JstlSqlTLV + + + Provides core validation features for JSTL tags. + + + + + transaction + org.apache.taglibs.standard.tag.rt.sql.TransactionTag + JSP + + Provides nested database action elements with a shared Connection, + set up to execute all statements as one transaction. + + + dataSource + false + true + + + isolation + false + true + + + + + query + org.apache.taglibs.standard.tag.rt.sql.QueryTag + JSP + + Executes the SQL query defined in its body or through the + sql attribute. + + + var + true + false + + + scope + false + false + + + sql + false + true + + + dataSource + false + true + + + startRow + false + true + + + maxRows + false + true + + + + + update + org.apache.taglibs.standard.tag.rt.sql.UpdateTag + JSP + + Executes the SQL update defined in its body or through the + sql attribute. + + + var + false + false + + + scope + false + false + + + sql + false + true + + + dataSource + false + true + + + + + param + org.apache.taglibs.standard.tag.rt.sql.ParamTag + JSP + + Sets a parameter in an SQL statement to the specified value. + + + value + false + true + + + + + dateParam + org.apache.taglibs.standard.tag.rt.sql.DateParamTag + JSP + + Sets a parameter in an SQL statement to the specified java.util.Date value. + + + value + true + true + + + type + false + true + + + + + setDataSource + org.apache.taglibs.standard.tag.rt.sql.SetDataSourceTag + empty + + Creates a simple DataSource suitable only for prototyping. + + + var + false + false + + + scope + false + false + + + dataSource + false + true + + + driver + false + true + + + url + false + true + + + user + false + true + + + password + false + true + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/sql.tld b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/sql.tld new file mode 100644 index 000000000000..8a2b625fa571 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/sql.tld @@ -0,0 +1,213 @@ + + + + 1.0 + 1.2 + sql + http://java.sun.com/jstl/sql + JSTL sql + JSTL 1.0 sql library + + + + org.apache.taglibs.standard.tlv.JstlSqlTLV + + + expressionAttributes + + transaction:dataSource + transaction:isolation + query:sql + query:dataSource + query:startRow + query:maxRows + update:sql + update:dataSource + param:value + dateParam:value + dateParam:type + setDataSource:dataSource + setDataSource:driver + setDataSource:url + setDataSource:user + setDataSource:password + + + Whitespace-separated list of colon-separated token pairs + describing tag:attribute combinations that accept expressions. + The validator uses this information to determine which + attributes need their syntax validated. + + + + + + transaction + org.apache.taglibs.standard.tag.el.sql.TransactionTag + JSP + + Provides nested database action elements with a shared Connection, + set up to execute all statements as one transaction. + + + dataSource + false + false + + + isolation + false + false + + + + + query + org.apache.taglibs.standard.tag.el.sql.QueryTag + JSP + + Executes the SQL query defined in its body or through the + sql attribute. + + + var + true + false + + + scope + false + false + + + sql + false + false + + + dataSource + false + false + + + startRow + false + false + + + maxRows + false + false + + + + + update + org.apache.taglibs.standard.tag.el.sql.UpdateTag + JSP + + Executes the SQL update defined in its body or through the + sql attribute. + + + var + false + false + + + scope + false + false + + + sql + false + false + + + dataSource + false + false + + + + + param + org.apache.taglibs.standard.tag.el.sql.ParamTag + JSP + + Sets a parameter in an SQL statement to the specified value. + + + value + false + false + + + + + dateParam + org.apache.taglibs.standard.tag.el.sql.DateParamTag + JSP + + Sets a parameter in an SQL statement to the specified java.util.Date val +ue. + + + value + true + true + + + type + false + true + + + + + setDataSource + org.apache.taglibs.standard.tag.el.sql.SetDataSourceTag + empty + + Creates a simple DataSource suitable only for prototyping. + + + var + false + false + + + scope + false + false + + + dataSource + false + false + + + driver + false + false + + + url + false + false + + + user + false + false + + + password + false + false + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/x-rt.tld b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/x-rt.tld new file mode 100644 index 000000000000..e7062b7cee14 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/x-rt.tld @@ -0,0 +1,256 @@ + + + + 1.0 + 1.2 + x_rt + http://java.sun.com/jstl/xml_rt + JSTL XML RT + JSTL 1.0 XML library + + + + org.apache.taglibs.standard.tlv.JstlXmlTLV + + + Provides validation features for JSTL XML tags. + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + out + org.apache.taglibs.standard.tag.rt.xml.ExprTag + empty + + Like <%= ... >, but for XPath expressions. + + + select + true + false + + + escapeXml + false + true + + + + + if + org.apache.taglibs.standard.tag.common.xml.IfTag + JSP + + XML conditional tag, which evalutes its body if the + supplied XPath expression evalutes to 'true' as a boolean + + + select + true + false + + + var + false + false + + + scope + false + false + + + + + forEach + org.apache.taglibs.standard.tag.common.xml.ForEachTag + JSP + + XML iteration tag. + + + var + false + false + + + select + true + false + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.rt.xml.ParamTag + JSP + + Adds a parameter to a containing 'transform' tag's Transformer + + + name + true + true + + + value + false + true + + + + + parse + org.apache.taglibs.standard.tag.rt.xml.ParseTag + org.apache.taglibs.standard.tei.XmlParseTEI + JSP + + Parses XML content from 'source' attribute or 'body' + + + var + false + false + + + varDom + false + false + + + scope + false + false + + + scopeDom + false + false + + + xml + false + true + + + systemId + false + true + + + filter + false + true + + + + + set + org.apache.taglibs.standard.tag.common.xml.SetTag + empty + + Saves the result of an XPath expression evaluation in a 'scope' + + + var + true + false + + + select + false + false + + + scope + false + false + + + + + transform + org.apache.taglibs.standard.tag.rt.xml.TransformTag + org.apache.taglibs.standard.tei.XmlTransformTEI + JSP + + Conducts a transformation given a source XML document + and an XSLT stylesheet + + + var + false + false + + + scope + false + false + + + result + false + true + + + xml + false + true + + + xmlSystemId + false + true + + + xslt + false + true + + + xsltSystemId + false + true + + + + + when + org.apache.taglibs.standard.tag.common.xml.WhenTag + JSP + + Subtag of <choose> that includes its body if its + expression evalutes to 'true' + + + select + true + false + + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/x.tld b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/x.tld new file mode 100644 index 000000000000..2237ccb418ba --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/META-INF/x.tld @@ -0,0 +1,273 @@ + + + + 1.0 + 1.2 + x + http://java.sun.com/jstl/xml + JSTL XML + JSTL 1.0 XML library + + + + org.apache.taglibs.standard.tlv.JstlXmlTLV + + + expressionAttributes + + out:escapeXml + parse:xml + parse:systemId + parse:filter + transform:xml + transform:xmlSystemId + transform:xslt + transform:xsltSystemId + transform:result + + + Whitespace-separated list of colon-separated token pairs + describing tag:attribute combinations that accept expressions. + The validator uses this information to determine which + attributes need their syntax validated. + + + + + + choose + org.apache.taglibs.standard.tag.common.core.ChooseTag + JSP + + Simple conditional tag that establishes a context for + mutually exclusive conditional operations, marked by + <when> and <otherwise> + + + + + out + org.apache.taglibs.standard.tag.el.xml.ExprTag + empty + + Like <%= ... >, but for XPath expressions. + + + select + true + false + + + escapeXml + false + false + + + + + if + org.apache.taglibs.standard.tag.common.xml.IfTag + JSP + + XML conditional tag, which evalutes its body if the + supplied XPath expression evalutes to 'true' as a boolean + + + select + true + false + + + var + false + false + + + scope + false + false + + + + + forEach + org.apache.taglibs.standard.tag.common.xml.ForEachTag + JSP + + XML iteration tag. + + + var + false + false + + + select + true + false + + + + + otherwise + org.apache.taglibs.standard.tag.common.core.OtherwiseTag + JSP + + Subtag of <choose> that follows <when> tags + and runs only if all of the prior conditions evaluated to + 'false' + + + + + param + org.apache.taglibs.standard.tag.el.xml.ParamTag + JSP + + Adds a parameter to a containing 'transform' tag's Transformer + + + name + true + false + + + value + false + false + + + + + parse + org.apache.taglibs.standard.tag.el.xml.ParseTag + org.apache.taglibs.standard.tei.XmlParseTEI + JSP + + Parses XML content from 'source' attribute or 'body' + + + var + false + false + + + varDom + false + false + + + scope + false + false + + + scopeDom + false + false + + + xml + false + false + + + systemId + false + false + + + filter + false + false + + + + + set + org.apache.taglibs.standard.tag.common.xml.SetTag + empty + + Saves the result of an XPath expression evaluation in a 'scope' + + + var + true + false + + + select + false + false + + + scope + false + false + + + + + transform + org.apache.taglibs.standard.tag.el.xml.TransformTag + org.apache.taglibs.standard.tei.XmlTransformTEI + JSP + + Conducts a transformation given a source XML document + and an XSLT stylesheet + + + var + false + false + + + scope + false + false + + + result + false + false + + + xml + false + false + + + xmlSystemId + false + false + + + xslt + false + false + + + xsltSystemId + false + false + + + + + when + org.apache.taglibs.standard.tag.common.xml.WhenTag + JSP + + Subtag of <choose> that includes its body if its + expression evalutes to 'true' + + + select + true + false + + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/cookies/CookieCutter.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/cookies/CookieCutter.jsp new file mode 100644 index 000000000000..bf7a067dce05 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/cookies/CookieCutter.jsp @@ -0,0 +1,40 @@ +<%@page contentType="text/html;charset=UTF-8"%> +<%@page isELEnabled="true"%> +<%@page isScriptingEnabled="false"%> +<%@ taglib prefix="fmt" uri="/WEB-INF/META-INF/fmt.tld" %> + +

Enter data for the cookie

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Name:
Value:
Domain:
Path:
Max Age:
Secure:
 
+ +
+ diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/cookies/CookieMake.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/cookies/CookieMake.jsp new file mode 100644 index 000000000000..dfcea10aa173 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/cookies/CookieMake.jsp @@ -0,0 +1,15 @@ +<%@page contentType="text/html;charset=UTF-8"%> +<%@page isELEnabled="true"%> +<%@page isScriptingEnabled="false"%> +<%@ taglib prefix="fmt" uri="/WEB-INF/META-INF/fmt.tld" %> + +

Made a cookie for you...

+ +

Cookie name = ${requestScope.cookie.name}, + value = ${requestScope.cookie.value}

+ + +
+ +
+ diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/cookies/Tray.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/cookies/Tray.jsp new file mode 100644 index 000000000000..e750ac3de6c3 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/cookies/Tray.jsp @@ -0,0 +1,21 @@ +<%@page contentType="text/html;charset=UTF-8"%> +<%@page isELEnabled="true"%> +<%@page isScriptingEnabled="false"%> +<%@taglib prefix="c" uri="/WEB-INF/META-INF/c.tld"%> +<%@ taglib prefix="fmt" uri="/WEB-INF/META-INF/fmt.tld" %> + +

Incoming cookies

+ + + + + + + + + + + +
#NameValue
${i}${ck.name}${ck.value}
+ + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/header.jspf b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/header.jspf new file mode 100644 index 000000000000..2153c1a2a234 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/header.jspf @@ -0,0 +1,2 @@ +

Midnight Cookie Company

+ diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/index.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/index.jsp new file mode 100644 index 000000000000..91443faac0ce --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/index.jsp @@ -0,0 +1,8 @@ +<%@page contentType="text/html"%> + +JSP Page + +Welcome to the midnight cookie company. + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/localized/Babel.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/localized/Babel.jsp new file mode 100644 index 000000000000..0eaf71e9df3b --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/localized/Babel.jsp @@ -0,0 +1,13 @@ +<%@page contentType="text/html;charset=UTF-8"%> +<%@page isELEnabled="true"%> +<%@page isScriptingEnabled="false"%> +<%@ taglib prefix="fmt" uri="/WEB-INF/META-INF/fmt.tld" %> + + + +

+

+ +

+ + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/main.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/main.jsp new file mode 100644 index 000000000000..52b08c594e79 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/main.jsp @@ -0,0 +1,68 @@ +<%@page contentType="text/html;charset=UTF-8"%> +<%@taglib prefix="fmt" uri="/WEB-INF/META-INF/fmt.tld" %> +<%@taglib prefix="c" uri="/WEB-INF/META-INF/c.tld"%> +<%@taglib prefix="tf" tagdir="/WEB-INF/tags/"%> + + +JSP 2.0 Sample Application + + + + + + + + + +
+ + + + + + + +
  + +<%@include file="header.jspf"%> + +
+ + +
+
+
+ +
+ +<%-- " flush="true"/> --%> +<%-- --%> + +
+ + + + +| + +
+ + + \ No newline at end of file diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/parameters/Input.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/parameters/Input.jsp new file mode 100644 index 000000000000..16e23a4730c9 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/parameters/Input.jsp @@ -0,0 +1,27 @@ +<%@page contentType="text/html;charset=UTF-8"%> +<%@page isELEnabled="true"%> +<%@page isScriptingEnabled="false"%> +<%@taglib prefix="fmt" uri="/WEB-INF/META-INF/fmt.tld" %> +<%@taglib prefix="c" uri="/WEB-INF/META-INF/c.tld" %> + + + +

+ +
+ + + + + + +<%-- We need a tag right here to handle this button for i18n--%> + + + +
: +
+
+ \ No newline at end of file diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/parameters/Output.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/parameters/Output.jsp new file mode 100644 index 000000000000..d37fa2f30cfe --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/docs/parameters/Output.jsp @@ -0,0 +1,14 @@ +<%@page contentType="text/html;charset=UTF-8"%> +<%@page isELEnabled="true"%> +<%@page isScriptingEnabled="false"%> +<%@ taglib prefix="fmt" uri="/WEB-INF/META-INF/fmt.tld" %> +<%@ taglib prefix="c" uri="/WEB-INF/META-INF/c.tld" %> + + + +

+: + +

+ + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/index.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/index.jsp new file mode 100644 index 000000000000..1a5defc90eee --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/index.jsp @@ -0,0 +1,6 @@ +<%@page contentType="text/html"%> + +Monitor demo app + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/tags/linklist.tag b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/tags/linklist.tag new file mode 100644 index 000000000000..d596ab68cc2b --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/tags/linklist.tag @@ -0,0 +1,14 @@ +<%@taglib prefix="fmt" uri="/WEB-INF/META-INF/fmt.tld" %> +<%@attribute name="separator" required="true" fragment="true"%> + + + + + + + + + + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/tags/myTags/first.tag b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/tags/myTags/first.tag new file mode 100644 index 000000000000..6c353da963ab --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/tags/myTags/first.tag @@ -0,0 +1,32 @@ +<%@tag description = "This is description for the first tag" pageEncoding="UTF-8" %> + +<%-- Taglib directives can be specified here: --%> +<%-- +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +--%> + +<%-- The list of normal or fragment attributes can be specified here: --%> + +<%@attribute name="title" required="true"%> +<%@attribute name="author"%> +<%@attribute name="price_info" fragment="true"%> + + +<%-- Use expression language to work with normal attributes or use --%> +<%-- the and actions for invoking JSP fragments and tag body: --%> +<%-- + + + + + + + + + + + + + +

${title}

Author: ${author}
Price Info:
Book Info:
+--%> diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/tags/myTags/test.tag b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/tags/myTags/test.tag new file mode 100644 index 000000000000..dfcca009324e --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/tags/myTags/test.tag @@ -0,0 +1,8 @@ + + + + + A sample tag: ${a} + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/tags/myTags/testx.tagx b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/tags/myTags/testx.tagx new file mode 100644 index 000000000000..16e002a09fa0 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/tags/myTags/testx.tagx @@ -0,0 +1,8 @@ + + + + + A sample tag: ${a} + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/tags/othertag.tag b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/tags/othertag.tag new file mode 100644 index 000000000000..92fd53d70c79 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/tags/othertag.tag @@ -0,0 +1,13 @@ +<%@taglib prefix="fmt" uri="/WEB-INF/META-INF/fmt.tld" %> +<%@attribute name="separator" required="true" fragment="true"%> + + + + + + + + + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.ias b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.ias new file mode 100644 index 000000000000..0ef427dfe0c9 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.ias @@ -0,0 +1,4 @@ + + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.warContent b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.warContent new file mode 100644 index 000000000000..30f41dec06c0 Binary files /dev/null and b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.warContent differ diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.webj2eeri b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.webj2eeri new file mode 100644 index 000000000000..58a475af84be --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.webj2eeri @@ -0,0 +1,6 @@ + + + + web + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.webweblogic b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.webweblogic new file mode 100644 index 000000000000..7540ad343365 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.webweblogic @@ -0,0 +1,4 @@ + + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.xml b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.xml new file mode 100644 index 000000000000..716636e51594 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.xml @@ -0,0 +1,65 @@ + + + + + + + NewServlet + NewServlet + + + NewServlet + /NewServlet + + + + 30 + + + + + inludePreludeCoda.jsp + + + + + Testing Prelude and Coda + Test + /inludePreludeCoda.jsp + /codaprelude/header.jsp + /codaprelude/footer.jsp + + + /encoding198637.jsp + utf-8 + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.xml.default b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.xml.default new file mode 100644 index 000000000000..d6e22f236ba8 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.xml.default @@ -0,0 +1,61 @@ + + + + + + + NewServlet + NewServlet + + + NewServlet + /NewServlet + + + + 30 + + + + + inludePreludeCoda.jsp + + + + + Testing Prelude and Coda + Test + /inludePreludeCoda.jsp + /codaprelude/header.jsp + /codaprelude/footer.jsp + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.xml.include-prelude b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.xml.include-prelude new file mode 100644 index 000000000000..7eab3ceb0fb1 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/WEB-INF/web.xml.include-prelude @@ -0,0 +1,27 @@ + + + + + + + + *.jsp + /header.jsp + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/basic.jspx b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/basic.jspx new file mode 100644 index 000000000000..077202c09ca0 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/basic.jspx @@ -0,0 +1,34 @@ + + + + + + + + + EN + + Hello World! + + + + + + + ]]> + + ${name} + + + ]]> + + ${name} + + + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/body.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/body.jsp new file mode 100644 index 000000000000..ba252983bf40 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/body.jsp @@ -0,0 +1,2 @@ + + Hello diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/codaprelude/footer.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/codaprelude/footer.jsp new file mode 100644 index 000000000000..99ed4de06398 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/codaprelude/footer.jsp @@ -0,0 +1,13 @@ + <% + list.add("Added in footer\n"); + %> + Footer was executed
+
+ Content of the List: + + + + +
Item:
+ + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/codaprelude/header.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/codaprelude/header.jsp new file mode 100644 index 000000000000..600dc84623d4 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/codaprelude/header.jsp @@ -0,0 +1,23 @@ +<%-- + Document : header + Created on : Aug 21, 2007, 11:32:03 AM + Author : petr +--%> +<%@page import="java.util.ArrayList" %> +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> + + + + + + JSP Page + + <% + ArrayList list = new ArrayList(); + list.add("Added in header\n"); + %> + + Header was executed
+ \ No newline at end of file diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/debug.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/debug.jsp new file mode 100644 index 000000000000..9c65ffcf7f4b --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/debug.jsp @@ -0,0 +1,28 @@ +<%@taglib prefix="c" uri="/WEB-INF/META-INF/c.tld" %> + +<%! String page = "myotherpage.jsp"; %> + +<%-- + + + + + + + + + + + +Some text to show instead + + +--%> + + + + + +${size} +${text} + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/encoding198637.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/encoding198637.jsp new file mode 100644 index 000000000000..0e4a16951868 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/encoding198637.jsp @@ -0,0 +1,22 @@ +<%-- + Document : index + Created on : May 16, 2011, 3:21:22 PM + Author : petrjiricka +--%> + +<%@page contentType="text/html"%> + + + + + + JSP Page + + +

Hello World!

+ Český text šikovně napsaný s háčky a čárkami bez předsudků. + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/faulty.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/faulty.jsp new file mode 100644 index 000000000000..6c5c9a122899 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/faulty.jsp @@ -0,0 +1,14 @@ +<%@page contentType="text/html;charset=UTF-8"%> +<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@taglib prefix="c" uri="/WEB-INF/META-INF/c.tld"%> +<%@taglib prefix="tf" tagdir="/WEB-INF/tags/"%> + + + + +<%-- incorrect, but should still be partially parsed --%> + + + + + \ No newline at end of file diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/header.jspf b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/header.jspf new file mode 100644 index 000000000000..e16d16d2a1b3 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/header.jspf @@ -0,0 +1 @@ +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/include.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/include.jsp new file mode 100644 index 000000000000..82d5d1af593f --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/include.jsp @@ -0,0 +1,19 @@ +<%-- + Document : include + Created on : Aug 21, 2007, 11:00:11 AM + Author : petr +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + + JSP Page + + + <%@ include file="body.jsp" %> + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/includePreludeCoda.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/includePreludeCoda.jsp new file mode 100644 index 000000000000..5931aed1a8f7 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/includePreludeCoda.jsp @@ -0,0 +1,3 @@ + +<% list.add ("Added in body"); %> +Body was executed
\ No newline at end of file diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/jspInclude.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/jspInclude.jsp new file mode 100644 index 000000000000..1b379769fa23 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/jspInclude.jsp @@ -0,0 +1,19 @@ +<%-- + Document : jspInclude + Created on : Aug 21, 2007, 10:58:18 AM + Author : petr +--%> + +<%@page contentType="text/html" pageEncoding="UTF-8"%> + + + + + + JSP Page + + + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/links.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/links.jsp new file mode 100644 index 000000000000..0166da7a0b90 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/links.jsp @@ -0,0 +1,44 @@ + + + + +<% + String type = request.getParameter("type"); + String buildNumber = request.getParameter("buildNumber"); +%> + +

+ + + + + + + + +<% + if(type.equals("history") || type.equals("both")) { +%> + + + + +<% + } + + if(type.equals("complete") || type.equals("both")) { +%> + + + + +<% + } +%> + +
Links
Performance historycomplete results in comparison with average of last 9 builds excluding current one
Complete test resultscomplete results of all measured values on last build
+

+ diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/main.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/main.jsp new file mode 100644 index 000000000000..b73befc9bc10 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/main.jsp @@ -0,0 +1,25 @@ +<%@page contentType="text/html;charset=UTF-8"%> +<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> +<%@taglib prefix="c" uri="/WEB-INF/META-INF/c.tld"%> +<%@taglib prefix="tf" tagdir="/WEB-INF/tags/"%> + + +JSP 2.0 Sample Application + + + + + + + + +
+
+ +blah + +
+ + + + \ No newline at end of file diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/main_1.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/main_1.jsp new file mode 100644 index 000000000000..68fcc7ded6d6 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/main_1.jsp @@ -0,0 +1,25 @@ +<%@page contentType="text/html;charset=UTF-8"%> +<%@taglib prefix="fmt" uri="/WEB-INF/META-INF/fmt.tld" %> +<%@taglib prefix="c" uri="/WEB-INF/META-INF/c.tld"%> +<%@taglib prefix="tf" tagdir="/WEB-INF/tags/"%> + + +JSP 2.0 Sample Application + + + + + + + + +
+
+ +blah + +
+ + + + \ No newline at end of file diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/main_2.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/main_2.jsp new file mode 100644 index 000000000000..afb3636a9443 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/main_2.jsp @@ -0,0 +1,7 @@ +<%@page contentType="text/html;charset=UTF-8"%> + + + +

hello world

+ + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/more_for_test/bean.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/more_for_test/bean.jsp new file mode 100644 index 000000000000..b035e5c8e6ff --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/more_for_test/bean.jsp @@ -0,0 +1,10 @@ +<%@page contentType="text/html"%> + +JSP Page + + + + + + + diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/myotherpage.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/myotherpage.jsp new file mode 100644 index 000000000000..c7f19b9e4712 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/myotherpage.jsp @@ -0,0 +1,5 @@ + + +This is something. + +<% out.println(request.getParameter("hello")); %> diff --git a/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/testTagLibs.jsp b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/testTagLibs.jsp new file mode 100644 index 000000000000..a04e0c98fa1a --- /dev/null +++ b/enterprise/web.jspparser/test/unit/data/project2_jakarta/web/testTagLibs.jsp @@ -0,0 +1,13 @@ +<%@page contentType="text/html" pageEncoding="UTF-8"%> +<%@taglib prefix="c" uri="http://java.sun.com/jstl/core"%> +<%@taglib prefix="tags" tagdir="/WEB-INF/tags/"%> +<%@taglib prefix="myTags" tagdir="/WEB-INF/tags/myTags/"%> +<%@taglib prefix="jarTags" uri="/TestTagLibrary"%> + +Test for taglib and tagfiles + + + + + + diff --git a/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/CacheTest.java b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/CacheTest.java index 0d62fbd69425..8886af07cd8c 100644 --- a/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/CacheTest.java +++ b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/CacheTest.java @@ -26,14 +26,13 @@ import java.lang.ref.WeakReference; import java.util.Collection; import java.util.Iterator; -import java.util.List; import java.util.Map; -import javax.servlet.jsp.tagext.TagLibraryInfo; import org.netbeans.junit.NbTestCase; import org.netbeans.modules.web.api.webmodule.WebModule; import org.netbeans.modules.web.jsps.parserapi.JspParserAPI; import org.netbeans.modules.web.jsps.parserapi.JspParserAPI.ParseResult; import org.netbeans.modules.web.jsps.parserapi.JspParserFactory; +import org.netbeans.modules.web.jsps.parserapi.TagLibraryInfo; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; @@ -85,10 +84,10 @@ public void testGCedWebModules() throws Exception { WebModule webModule = TestUtil.createWebModule(jspFo.getParent()); jspParser.analyzePage(jspFo, webModule, JspParserAPI.ERROR_IGNORE); - Reference proxy = new WeakReference(jspParser.parseSupports.get(webModule)); + Reference proxy = new WeakReference<>(jspParser.parseSupports.get(webModule)); assertNotNull("WebModule should be cached", proxy.get()); - Reference wmRef = new WeakReference(webModule); + Reference wmRef = new WeakReference<>(webModule); webModule = null; assertGC("web module should be garbage collected", wmRef); jspParser.parseSupports.size(); @@ -119,14 +118,14 @@ public void xxxtestCachedTagLibInfos() throws Exception { WebModule webModule = TestUtil.getWebModule(jspFo); ParseResult result = jspParser.analyzePage(jspFo, webModule, JspParserAPI.ERROR_IGNORE); - Collection tagLibs1 = result.getPageInfo().getTaglibs(); + Collection tagLibs1 = result.getPageInfo().getTagLibraries().values(); jspFo = TestUtil.getProjectFile(this, "project2", "/web/basic.jspx"); result = jspParser.analyzePage(jspFo, webModule, JspParserAPI.ERROR_IGNORE); - Collection tagLibs2 = result.getPageInfo().getTaglibs(); + Collection tagLibs2 = result.getPageInfo().getTagLibraries().values(); - assertTrue(tagLibs1.size() > 0); - assertTrue(tagLibs2.size() > 0); + assertTrue(!tagLibs1.isEmpty()); + assertTrue(!tagLibs2.isEmpty()); assertTrue(tagLibs1.size() == tagLibs2.size()); Iterator iter1 = tagLibs1.iterator(); diff --git a/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/FastScanTest.java b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/FastScanTest.java index 2b63d5a60289..9ddb0ecf289f 100644 --- a/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/FastScanTest.java +++ b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/FastScanTest.java @@ -47,10 +47,14 @@ protected void setUp() throws Exception { public void testPage1() throws Exception { doFastScanTest("jspparser-data/wmroot", "subdir/Page1.jsp", new JspParserAPI.JspOpenInfo(false, "ISO-8859-1")); } - + public void testEncodingBug198637() throws Exception { doFastScanTest("project2/web", "encoding198637.jsp", new JspParserAPI.JspOpenInfo(false, "utf-8")); } + + public void testEncodingBug198637Jakarta() throws Exception { + doFastScanTest("project2_jakarta/web", "encoding198637.jsp", new JspParserAPI.JspOpenInfo(false, "utf-8")); + } public void doFastScanTest(String wmRootPath, String path, JspParserAPI.JspOpenInfo correctInfo) throws Exception { FileObject wmRoot = TestUtil.getFileInWorkDir(wmRootPath, this); diff --git a/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/ParseTest.java b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/ParseTest.java index 8037a0132f7f..fece60aa3d5d 100644 --- a/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/ParseTest.java +++ b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/ParseTest.java @@ -25,7 +25,6 @@ import java.io.PrintWriter; import org.netbeans.modules.web.jsps.parserapi.JspParserAPI; -import org.netbeans.modules.web.jsps.parserapi.JspParserFactory; import org.openide.filesystems.FileObject; import org.netbeans.junit.NbTestCase; @@ -59,22 +58,42 @@ public void testAnalysisMain() throws Exception { parserTestInProject("project2", "/web/main.jsp"); } + public void testAnalysisMainJakarta() throws Exception { + parserTestInProject("project2_jakarta", "/web/main.jsp"); + } + public void testAnalysisBean() throws Exception { parserTestInProject("project2", "/web/more_for_test/bean.jsp"); } + public void testAnalysisBeanJakarta() throws Exception { + parserTestInProject("project2_jakarta", "/web/more_for_test/bean.jsp"); + } + public void testAnalysisTagLinkList() throws Exception { parserTestInProject("project2", "/web/WEB-INF/tags/linklist.tag"); } + public void testAnalysisTagLinkListJakarta() throws Exception { + parserTestInProject("project2_jakarta", "/web/WEB-INF/tags/linklist.tag"); + } + public void testAnalysisFaulty() throws Exception { parserTestInProject("project2", "/web/faulty.jsp"); } + public void testAnalysisFaultyJakarta() throws Exception { + parserTestInProject("project2_jakarta", "/web/faulty.jsp"); + } + public void testAnalysisOutsideWM() throws Exception { parserTestInProject("project2", "/outside/outsidewm.jsp"); } + public void testAnalysisOutsideWMJakarta() throws Exception { + parserTestInProject("project2_jakarta", "/outside/outsidewm.jsp"); + } + // TODO: temporarily disabled because of JDK 5 and 6 differences public void disableTestAnalysisTagLibFromTagFiles_1_6() throws Exception { parserTestInProject("project2", "/web/testTagLibs.jsp"); @@ -84,17 +103,32 @@ public void testJSPInclude() throws Exception { parserTestInProject("project2", "/web/jspInclude.jsp"); } + public void testJSPIncludeJakarta() throws Exception { + parserTestInProject("project2_jakarta", "/web/jspInclude.jsp"); + } + public void testInclude() throws Exception { parserTestInProject("project2", "/web/include.jsp"); } + public void testIncludeJakarta() throws Exception { + parserTestInProject("project2_jakarta", "/web/include.jsp"); + + } + public void testIncludePreludeCoda() throws Exception { JspParserAPI.ParseResult result = parserTestInProject("project2", "/web/includePreludeCoda.jsp"); log("Prelude: " + result.getPageInfo().getIncludePrelude()); log("Coda: " + result.getPageInfo().getIncludeCoda()); } + public void testIncludePreludeCodaJakarta() throws Exception { + JspParserAPI.ParseResult result = parserTestInProject("project2_jakarta", "/web/includePreludeCoda.jsp"); + log("Prelude: " + result.getPageInfo().getIncludePrelude()); + log("Coda: " + result.getPageInfo().getIncludeCoda()); + } + public JspParserAPI.ParseResult parserTestInProject(String projectFolderName, String pagePath) throws Exception { FileObject jspFo = TestUtil.getProjectFile(this, projectFolderName, pagePath); WebModule webModule = TestUtil.getWebModule(jspFo); diff --git a/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/TestUtil.java b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/TestUtil.java index 109328c4b485..69ac0f1581c4 100644 --- a/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/TestUtil.java +++ b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/TestUtil.java @@ -45,6 +45,7 @@ import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; import org.openide.util.Lookup; +import org.openide.util.Utilities; import org.openide.util.lookup.Lookups; import org.openide.util.lookup.ProxyLookup; @@ -210,7 +211,9 @@ private static void extractFile(ZipFile zipFile, ZipEntry e, File destination) t public static void initParserJARs() throws MalformedURLException { List list = getJARs("jsp.parser.jars"); - JspParserImpl.setParserJARs(list.toArray(new URL[0])); + List listJakarta = getJARs("jsp.parser.jars-jakarta"); + + JspParserImpl.setParserJARs(list.toArray(new URL[0]), listJakarta.toArray(new URL[0])); } public static List getJARs(String propertyName) throws MalformedURLException { @@ -223,7 +226,7 @@ public static List getJARs(String propertyName) throws MalformedURLExceptio if (!f.exists()) { throw new RuntimeException("cannot find file "+token); } - list.add(f.toURI().toURL()); + list.add(Utilities.toURI(f).toURL()); } return list; } diff --git a/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testAnalysisBeanJakarta.pass b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testAnalysisBeanJakarta.pass new file mode 100644 index 000000000000..05194a6074d3 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testAnalysisBeanJakarta.pass @@ -0,0 +1,162 @@ +--------- JspParserAPI.parseResult(), success: true + ---- PAGEINFO +----- PageInfo ----- + imports: + jakarta.servlet.* + jakarta.servlet.http.* + jakarta.servlet.jsp.* + dependants: + taglibsMap: + prefixMapper: + approxXmlPrefixMapper : + language : java + xtends : org.apache.jasper.runtime.HttpJspBase + contentType : text/html + session : true + buffer : 8192 + autoFlush : true + threadSafe : true + isErrorPage : false + errorPage : null + scriptless : true + scriptingInvalid : false + elIgnored : false + omitXmlDecl : null + isJspPrefixHijacked : false + doctypeName : null + doctypeSystem : null + doctypePublic : null + hasJspRoot : false + prefixes: + includePrelude: + includeCoda: + pluginDcls: + beans: + bean : bean1, more_for_test.TestBean + ------- XML View (constructed from the original data structure) ----- + + + + + + + + +]]> + + +]]> + + +JSP Page]]> + + +]]> + + + +]]> + + + + +]]> + + + + + + + + + + + +]]> + + + +]]> + + + + ---- NODES + +Node [/more_for_test/bean.jsp(1,1), PageDirective] <%@ page contentType="text/html"%> +Node [/more_for_test/bean.jsp(1,34), TemplateText] + +Node [/more_for_test/bean.jsp(2,0), TemplateText] + +Node [/more_for_test/bean.jsp(3,0), TemplateText] +Node [/more_for_test/bean.jsp(3,6), TemplateText] JSP Page +Node [/more_for_test/bean.jsp(3,21), TemplateText] +Node [/more_for_test/bean.jsp(3,29), TemplateText] + +Node [/more_for_test/bean.jsp(4,0), TemplateText] + + +Node [/more_for_test/bean.jsp(6,0), UseBean] +Node [/more_for_test/bean.jsp(6,73), TemplateText] + +Node [/more_for_test/bean.jsp(7,0), GetProperty] +Node [/more_for_test/bean.jsp(7,59), TemplateText] + + +Node [/more_for_test/bean.jsp(9,0), TemplateText] + +Node [/more_for_test/bean.jsp(10,0), TemplateText] + diff --git a/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testAnalysisFaultyJakarta.pass b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testAnalysisFaultyJakarta.pass new file mode 100644 index 000000000000..934b370c1d45 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testAnalysisFaultyJakarta.pass @@ -0,0 +1,151 @@ +--------- JspParserAPI.parseResult(), success: false + ---- PAGEINFO +----- PageInfo ----- + imports: + jakarta.servlet.* + jakarta.servlet.http.* + jakarta.servlet.jsp.* + dependants: + /WEB-INF/META-INF/c.tld + taglibsMap: + tag library: /WEB-INF/META-INF/c.tld + tlibversion : 1.0 + jspversion : 1.2 + shortname : c + urn : http://java.sun.com/jstl/core + info : JSTL 1.0 core library + uri : /WEB-INF/META-INF/c.tld + tag name : catch + class : org.apache.taglibs.standard.tag.common.core.CatchTag + attribs : [var] + tag name : choose + class : org.apache.taglibs.standard.tag.common.core.ChooseTag + attribs : [] + tag name : out + class : org.apache.taglibs.standard.tag.el.core.OutTag + attribs : [value, default, escapeXml] + tag name : if + class : org.apache.taglibs.standard.tag.el.core.IfTag + attribs : [test, var, scope] + tag name : import + class : org.apache.taglibs.standard.tag.el.core.ImportTag + attribs : [url, var, scope, varReader, context, charEncoding] + tag name : forEach + class : org.apache.taglibs.standard.tag.el.core.ForEachTag + attribs : [items, begin, end, step, var, varStatus] + tag name : forTokens + class : org.apache.taglibs.standard.tag.el.core.ForTokensTag + attribs : [items, delims, begin, end, step, var, varStatus] + tag name : otherwise + class : org.apache.taglibs.standard.tag.common.core.OtherwiseTag + attribs : [] + tag name : param + class : org.apache.taglibs.standard.tag.el.core.ParamTag + attribs : [name, value] + tag name : redirect + class : org.apache.taglibs.standard.tag.el.core.RedirectTag + attribs : [var, scope, url, context] + tag name : remove + class : org.apache.taglibs.standard.tag.common.core.RemoveTag + attribs : [var, scope] + tag name : set + class : org.apache.taglibs.standard.tag.el.core.SetTag + attribs : [var, value, target, property, scope] + tag name : url + class : org.apache.taglibs.standard.tag.el.core.UrlTag + attribs : [var, scope, value, context] + tag name : when + class : org.apache.taglibs.standard.tag.el.core.WhenTag + attribs : [test] + tag library: http://java.sun.com/jsp/jstl/fmt + tlibversion : 1.1 + jspversion : 2.0 + shortname : fmt + urn : http://java.sun.com/jsp/jstl/fmt + info : JSTL 1.1 i18n-capable formatting library + uri : http://java.sun.com/jsp/jstl/fmt + tag name : requestEncoding + class : org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag + attribs : [value] + tag name : setLocale + class : org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag + attribs : [value, variant, scope] + tag name : timeZone + class : org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag + attribs : [value] + tag name : setTimeZone + class : org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag + attribs : [value, var, scope] + tag name : bundle + class : org.apache.taglibs.standard.tag.rt.fmt.BundleTag + attribs : [basename, prefix] + tag name : setBundle + class : org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag + attribs : [basename, var, scope] + tag name : message + class : org.apache.taglibs.standard.tag.rt.fmt.MessageTag + attribs : [key, bundle, var, scope] + tag name : param + class : org.apache.taglibs.standard.tag.rt.fmt.ParamTag + attribs : [value] + tag name : formatNumber + class : org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag + attribs : [value, type, pattern, currencyCode, currencySymbol, groupingUsed, maxIntegerDigits, minIntegerDigits, maxFractionDigits, minFractionDigits, var, scope] + tag name : parseNumber + class : org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag + attribs : [value, type, pattern, parseLocale, integerOnly, var, scope] + tag name : formatDate + class : org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag + attribs : [value, type, dateStyle, timeStyle, pattern, timeZone, var, scope] + tag name : parseDate + class : org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag + attribs : [value, type, dateStyle, timeStyle, pattern, timeZone, parseLocale, var, scope] + tag library: urn:jsptagdir:/WEB-INF/tags/ + tlibversion : 1.0 + jspversion : 2.0 + shortname : tags + urn : null + info : null + uri : null + tagfile path : /WEB-INF/tags/linklist.tag + tag name : linklist + class : org.apache.jsp.tag.web.linklist_tag + attribs : [separator] + tagfile path : /WEB-INF/tags/othertag.tag + tag name : othertag + class : org.apache.jsp.tag.web.othertag_tag + attribs : [separator] + prefixMapper: + c -> /WEB-INF/META-INF/c.tld + fmt -> http://java.sun.com/jsp/jstl/fmt + tf -> urn:jsptagdir:/WEB-INF/tags/ + approxXmlPrefixMapper : + language : java + xtends : org.apache.jasper.runtime.HttpJspBase + contentType : null + session : true + buffer : 8192 + autoFlush : true + threadSafe : true + isErrorPage : false + errorPage : null + scriptless : false + scriptingInvalid : false + elIgnored : false + omitXmlDecl : null + isJspPrefixHijacked : false + doctypeName : null + doctypeSystem : null + doctypePublic : null + hasJspRoot : false + prefixes: + includePrelude: + includeCoda: + pluginDcls: + beans: + ------- XML View (constructed from the original data structure) ----- +no XML view + + ---- ERRORS +ERROR in /faulty.jsp at [10, 0] No tag "setLocaale" defined in tag library imported with prefix "fmt" + diff --git a/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testAnalysisMainJakarta.pass b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testAnalysisMainJakarta.pass new file mode 100644 index 000000000000..4033b36d1e3c --- /dev/null +++ b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testAnalysisMainJakarta.pass @@ -0,0 +1,360 @@ +--------- JspParserAPI.parseResult(), success: true + ---- PAGEINFO +----- PageInfo ----- + imports: + jakarta.servlet.* + jakarta.servlet.http.* + jakarta.servlet.jsp.* + dependants: + /WEB-INF/META-INF/c.tld + taglibsMap: + tag library: /WEB-INF/META-INF/c.tld + tlibversion : 1.0 + jspversion : 1.2 + shortname : c + urn : http://java.sun.com/jstl/core + info : JSTL 1.0 core library + uri : /WEB-INF/META-INF/c.tld + tag name : catch + class : org.apache.taglibs.standard.tag.common.core.CatchTag + attribs : [var] + tag name : choose + class : org.apache.taglibs.standard.tag.common.core.ChooseTag + attribs : [] + tag name : out + class : org.apache.taglibs.standard.tag.el.core.OutTag + attribs : [value, default, escapeXml] + tag name : if + class : org.apache.taglibs.standard.tag.el.core.IfTag + attribs : [test, var, scope] + tag name : import + class : org.apache.taglibs.standard.tag.el.core.ImportTag + attribs : [url, var, scope, varReader, context, charEncoding] + tag name : forEach + class : org.apache.taglibs.standard.tag.el.core.ForEachTag + attribs : [items, begin, end, step, var, varStatus] + tag name : forTokens + class : org.apache.taglibs.standard.tag.el.core.ForTokensTag + attribs : [items, delims, begin, end, step, var, varStatus] + tag name : otherwise + class : org.apache.taglibs.standard.tag.common.core.OtherwiseTag + attribs : [] + tag name : param + class : org.apache.taglibs.standard.tag.el.core.ParamTag + attribs : [name, value] + tag name : redirect + class : org.apache.taglibs.standard.tag.el.core.RedirectTag + attribs : [var, scope, url, context] + tag name : remove + class : org.apache.taglibs.standard.tag.common.core.RemoveTag + attribs : [var, scope] + tag name : set + class : org.apache.taglibs.standard.tag.el.core.SetTag + attribs : [var, value, target, property, scope] + tag name : url + class : org.apache.taglibs.standard.tag.el.core.UrlTag + attribs : [var, scope, value, context] + tag name : when + class : org.apache.taglibs.standard.tag.el.core.WhenTag + attribs : [test] + tag library: http://java.sun.com/jsp/jstl/fmt + tlibversion : 1.1 + jspversion : 2.0 + shortname : fmt + urn : http://java.sun.com/jsp/jstl/fmt + info : JSTL 1.1 i18n-capable formatting library + uri : http://java.sun.com/jsp/jstl/fmt + tag name : requestEncoding + class : org.apache.taglibs.standard.tag.rt.fmt.RequestEncodingTag + attribs : [value] + tag name : setLocale + class : org.apache.taglibs.standard.tag.rt.fmt.SetLocaleTag + attribs : [value, variant, scope] + tag name : timeZone + class : org.apache.taglibs.standard.tag.rt.fmt.TimeZoneTag + attribs : [value] + tag name : setTimeZone + class : org.apache.taglibs.standard.tag.rt.fmt.SetTimeZoneTag + attribs : [value, var, scope] + tag name : bundle + class : org.apache.taglibs.standard.tag.rt.fmt.BundleTag + attribs : [basename, prefix] + tag name : setBundle + class : org.apache.taglibs.standard.tag.rt.fmt.SetBundleTag + attribs : [basename, var, scope] + tag name : message + class : org.apache.taglibs.standard.tag.rt.fmt.MessageTag + attribs : [key, bundle, var, scope] + tag name : param + class : org.apache.taglibs.standard.tag.rt.fmt.ParamTag + attribs : [value] + tag name : formatNumber + class : org.apache.taglibs.standard.tag.rt.fmt.FormatNumberTag + attribs : [value, type, pattern, currencyCode, currencySymbol, groupingUsed, maxIntegerDigits, minIntegerDigits, maxFractionDigits, minFractionDigits, var, scope] + tag name : parseNumber + class : org.apache.taglibs.standard.tag.rt.fmt.ParseNumberTag + attribs : [value, type, pattern, parseLocale, integerOnly, var, scope] + tag name : formatDate + class : org.apache.taglibs.standard.tag.rt.fmt.FormatDateTag + attribs : [value, type, dateStyle, timeStyle, pattern, timeZone, var, scope] + tag name : parseDate + class : org.apache.taglibs.standard.tag.rt.fmt.ParseDateTag + attribs : [value, type, dateStyle, timeStyle, pattern, timeZone, parseLocale, var, scope] + tag library: urn:jsptagdir:/WEB-INF/tags/ + tlibversion : 1.0 + jspversion : 2.0 + shortname : tags + urn : null + info : null + uri : null + tagfile path : /WEB-INF/tags/linklist.tag + tag name : linklist + class : org.apache.jsp.tag.web.linklist_tag + attribs : [separator] + tagfile path : /WEB-INF/tags/othertag.tag + tag name : othertag + class : org.apache.jsp.tag.web.othertag_tag + attribs : [separator] + prefixMapper: + c -> /WEB-INF/META-INF/c.tld + fmt -> http://java.sun.com/jsp/jstl/fmt + tf -> urn:jsptagdir:/WEB-INF/tags/ + approxXmlPrefixMapper : + language : java + xtends : org.apache.jasper.runtime.HttpJspBase + contentType : text/html;charset=UTF-8 + session : true + buffer : 8192 + autoFlush : true + threadSafe : true + isErrorPage : false + errorPage : null + scriptless : true + scriptingInvalid : false + elIgnored : false + omitXmlDecl : null + isJspPrefixHijacked : false + doctypeName : null + doctypeSystem : null + doctypePublic : null + hasJspRoot : false + prefixes: + includePrelude: + includeCoda: + pluginDcls: + beans: + ------- XML View (constructed from the original data structure) ----- + + + + + + + + + + + + + + + + + +]]> + + +]]> + + +JSP 2.0 Sample Application]]> + + +]]> + + + +]]> + + + +]]> + + + + +]]> + + + + + + + + + + + + +]]> + + + + + + + + + + + + + +]]> + + +]]> + + + + ---- NODES + +Node [/main.jsp(1,1), PageDirective] <%@ page contentType="text/html;charset=UTF-8"%> +Node [/main.jsp(1,48), TemplateText] + +Node [/main.jsp(2,0), TaglibDirective] <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> +Node [/main.jsp(2,64), TemplateText] + +Node [/main.jsp(3,0), TaglibDirective] <%@ taglib prefix="c" uri="/WEB-INF/META-INF/c.tld"%> +Node [/main.jsp(3,52), TemplateText] + +Node [/main.jsp(4,0), TaglibDirective] <%@ taglib prefix="tf" tagdir="/WEB-INF/tags/"%> +Node [/main.jsp(4,47), TemplateText] + + +Node [/main.jsp(6,0), TemplateText] + +Node [/main.jsp(7,0), TemplateText] +Node [/main.jsp(7,6), TemplateText] JSP 2.0 Sample Application +Node [/main.jsp(7,39), TemplateText] +Node [/main.jsp(7,47), TemplateText] + +Node [/main.jsp(8,0), TemplateText] + +Node [/main.jsp(9,0), TemplateText] + + +Node [/main.jsp(11,0), CustomTag] +Node [/main.jsp(11,45), TemplateText] + +Node [/main.jsp(12,0), CustomTag] +Node [/main.jsp(12,79), TemplateText] + + +Node [/main.jsp(14,0), CustomTag] +Node [/main.jsp(15,14), NamedAttribute] +Node [/main.jsp(16,0), TemplateText]
+Node [/main.jsp(18,9), JspBody] +Node [/main.jsp(18,10), TemplateText] +blah +
+Node [/main.jsp(21,14), TemplateText] + + + +Node [/main.jsp(24,0), TemplateText] + +Node [/main.jsp(25,0), TemplateText] diff --git a/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testAnalysisOutsideWMJakarta.pass b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testAnalysisOutsideWMJakarta.pass new file mode 100644 index 000000000000..07ef61e62231 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testAnalysisOutsideWMJakarta.pass @@ -0,0 +1,5 @@ +--------- JspParserAPI.parseResult(), success: false + + ---- ERRORS +ERROR in outsidewm.jsp at [-1, -1] File outsidewm.jsp is not contained within a web module. + diff --git a/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testAnalysisTagLinkListJakarta.pass b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testAnalysisTagLinkListJakarta.pass new file mode 100644 index 000000000000..fac288d02c75 --- /dev/null +++ b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testAnalysisTagLinkListJakarta.pass @@ -0,0 +1,127 @@ +--------- JspParserAPI.parseResult(), success: false + ---- PAGEINFO +----- PageInfo ----- + imports: + jakarta.servlet.* + jakarta.servlet.http.* + jakarta.servlet.jsp.* + dependants: + /WEB-INF/META-INF/fmt.tld + taglibsMap: + tag library: /WEB-INF/META-INF/fmt.tld + tlibversion : 1.0 + jspversion : 1.2 + shortname : fmt + urn : http://java.sun.com/jstl/fmt + info : JSTL 1.0 i18n-capable formatting library + uri : /WEB-INF/META-INF/fmt.tld + tag name : requestEncoding + class : org.apache.taglibs.standard.tag.el.fmt.RequestEncodingTag + attribs : [value] + tag name : setLocale + class : org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag + attribs : [value, variant, scope] + tag name : timeZone + class : org.apache.taglibs.standard.tag.el.fmt.TimeZoneTag + attribs : [value] + tag name : setTimeZone + class : org.apache.taglibs.standard.tag.el.fmt.SetTimeZoneTag + attribs : [value, var, scope] + tag name : bundle + class : org.apache.taglibs.standard.tag.el.fmt.BundleTag + attribs : [basename, prefix] + tag name : setBundle + class : org.apache.taglibs.standard.tag.el.fmt.SetBundleTag + attribs : [basename, var, scope] + tag name : message + class : org.apache.taglibs.standard.tag.el.fmt.MessageTag + attribs : [key, bundle, var, scope] + tag name : param + class : org.apache.taglibs.standard.tag.el.fmt.ParamTag + attribs : [value] + tag name : formatNumber + class : org.apache.taglibs.standard.tag.el.fmt.FormatNumberTag + attribs : [value, type, pattern, currencyCode, currencySymbol, groupingUsed, maxIntegerDigits, minIntegerDigits, maxFractionDigits, minFractionDigits, var, scope] + tag name : parseNumber + class : org.apache.taglibs.standard.tag.el.fmt.ParseNumberTag + attribs : [value, type, pattern, parseLocale, integerOnly, var, scope] + tag name : formatDate + class : org.apache.taglibs.standard.tag.el.fmt.FormatDateTag + attribs : [value, type, dateStyle, timeStyle, pattern, timeZone, var, scope] + tag name : parseDate + class : org.apache.taglibs.standard.tag.el.fmt.ParseDateTag + attribs : [value, type, dateStyle, timeStyle, pattern, timeZone, parseLocale, var, scope] + prefixMapper: + fmt -> /WEB-INF/META-INF/fmt.tld + approxXmlPrefixMapper : + language : java + xtends : org.apache.jasper.runtime.HttpJspBase + contentType : text/html + session : true + buffer : 8192 + autoFlush : true + threadSafe : true + isErrorPage : false + errorPage : null + scriptless : false + scriptingInvalid : false + elIgnored : false + omitXmlDecl : null + isJspPrefixHijacked : false + doctypeName : null + doctypeSystem : null + doctypePublic : null + hasJspRoot : false + prefixes: + includePrelude: + includeCoda: + pluginDcls: + beans: + Tag file: + taginfo is null + ------- XML View (constructed from the original data structure) ----- +no XML view + + ---- NODES + +Node [/WEB-INF/tags/linklist.tag(1,1), TaglibDirective] <%@ taglib prefix="fmt" uri="/WEB-INF/META-INF/fmt.tld"%> +Node [/WEB-INF/tags/linklist.tag(1,58), TemplateText] + +Node [/WEB-INF/tags/linklist.tag(2,63), TemplateText] + + + +Node [/WEB-INF/tags/linklist.tag(5,0), TemplateText] +Node [/WEB-INF/tags/linklist.tag(5,26), CustomTag] +Node [/WEB-INF/tags/linklist.tag(5,70), TemplateText] + +Node [/WEB-INF/tags/linklist.tag(6,0), InvokeAction] +Node [/WEB-INF/tags/linklist.tag(6,34), TemplateText] + +Node [/WEB-INF/tags/linklist.tag(7,0), TemplateText] +Node [/WEB-INF/tags/linklist.tag(7,37), CustomTag] +Node [/WEB-INF/tags/linklist.tag(7,87), TemplateText] + +Node [/WEB-INF/tags/linklist.tag(8,0), InvokeAction] +Node [/WEB-INF/tags/linklist.tag(8,34), TemplateText] + +Node [/WEB-INF/tags/linklist.tag(9,0), TemplateText] +Node [/WEB-INF/tags/linklist.tag(9,41), CustomTag] +Node [/WEB-INF/tags/linklist.tag(9,88), TemplateText] + +Node [/WEB-INF/tags/linklist.tag(10,0), InvokeAction] +Node [/WEB-INF/tags/linklist.tag(10,34), TemplateText] + +Node [/WEB-INF/tags/linklist.tag(11,0), TemplateText] +Node [/WEB-INF/tags/linklist.tag(11,36), CustomTag] +Node [/WEB-INF/tags/linklist.tag(11,85), TemplateText] + + + +Node [/WEB-INF/tags/linklist.tag(14,0), DoBodyAction] +Node [/WEB-INF/tags/linklist.tag(14,13), TemplateText] + + + ---- ERRORS +ERROR in /WEB-INF/tags/linklist.tag at [5, 26] According to TLD or attribute directive in tag file, attribute bundle does not accept any expressions + diff --git a/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testIncludeJakarta.pass b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testIncludeJakarta.pass new file mode 100644 index 000000000000..d8d467fd620b --- /dev/null +++ b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testIncludeJakarta.pass @@ -0,0 +1,204 @@ +--------- JspParserAPI.parseResult(), success: true + ---- PAGEINFO +----- PageInfo ----- + imports: + jakarta.servlet.* + jakarta.servlet.http.* + jakarta.servlet.jsp.* + dependants: + /body.jsp + taglibsMap: + prefixMapper: + approxXmlPrefixMapper : + language : java + xtends : org.apache.jasper.runtime.HttpJspBase + contentType : text/html;charset=UTF-8 + session : true + buffer : 8192 + autoFlush : true + threadSafe : true + isErrorPage : false + errorPage : null + scriptless : true + scriptingInvalid : false + elIgnored : false + omitXmlDecl : null + isJspPrefixHijacked : false + doctypeName : null + doctypeSystem : null + doctypePublic : null + hasJspRoot : false + prefixes: + includePrelude: + includeCoda: + pluginDcls: + beans: + ------- XML View (constructed from the original data structure) ----- + + + + + + + + + + + + +]]> + + + + ]]> + + + + ]]> + + + + ]]> + + +JSP Page]]> + + + + ]]> + + + + ]]> + + + + ]]> + + + + + + Hello ]]> + + + +]]> + + + + + + +]]> + + + +]]> + + + + ---- NODES + +Node [/include.jsp(1,5), Comment] <%-- + Document : include + Created on : Aug 21, 2007, 11:00:11 AM + Author : petr +--%> +Node [/include.jsp(5,4), TemplateText] + + +Node [/include.jsp(7,0), PageDirective] <%@ page contentType="text/html" pageEncoding="UTF-8"%> +Node [/include.jsp(7,54), TemplateText] + +Node [/include.jsp(8,0), TemplateText] + + +Node [/include.jsp(11,0), TemplateText] + +Node [/include.jsp(12,4), TemplateText] + +Node [/include.jsp(13,8), TemplateText] + +Node [/include.jsp(14,8), TemplateText] JSP Page +Node [/include.jsp(14,23), TemplateText] + +Node [/include.jsp(15,4), TemplateText] + +Node [/include.jsp(16,4), TemplateText] + +Node [/include.jsp(17,8), IncludeDirective] <%@ include file="body.jsp"%> +Node [/body.jsp(1,1), TemplateText] + +Node [/body.jsp(2,0), TemplateText] Hello +Node [/body.jsp(2,10), TemplateText] + +Node [/include.jsp(17,38), TemplateText] + +Node [/include.jsp(18,4), TemplateText] + +Node [/include.jsp(19,0), TemplateText] + diff --git a/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testIncludePreludeCodaJakarta.pass b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testIncludePreludeCodaJakarta.pass new file mode 100644 index 000000000000..510efaeb8c7e --- /dev/null +++ b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testIncludePreludeCodaJakarta.pass @@ -0,0 +1,82 @@ +--------- JspParserAPI.parseResult(), success: true + ---- PAGEINFO +----- PageInfo ----- + imports: + jakarta.servlet.* + jakarta.servlet.http.* + jakarta.servlet.jsp.* + dependants: + taglibsMap: + prefixMapper: + approxXmlPrefixMapper : + language : java + xtends : org.apache.jasper.runtime.HttpJspBase + contentType : text/html + session : true + buffer : 8192 + autoFlush : true + threadSafe : true + isErrorPage : false + errorPage : null + scriptless : false + scriptingInvalid : false + elIgnored : false + omitXmlDecl : null + isJspPrefixHijacked : false + doctypeName : null + doctypeSystem : null + doctypePublic : null + hasJspRoot : false + prefixes: + includePrelude: + includeCoda: + pluginDcls: + beans: + ------- XML View (constructed from the original data structure) ----- + + + + + + + + + + + + + +]]> + + + + ---- NODES + +Node [/includePreludeCoda.jsp(1,1), TemplateText] + +Node [/includePreludeCoda.jsp(2,2), Scriptlet] <% list.add ("Added in body"); %> +Node [/includePreludeCoda.jsp(2,33), TemplateText] +Body was executed +Node [/includePreludeCoda.jsp(3,18), TemplateText]
diff --git a/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testJSPIncludeJakarta.pass b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testJSPIncludeJakarta.pass new file mode 100644 index 000000000000..b2a071b0bcff --- /dev/null +++ b/enterprise/web.jspparser/test/unit/src/org/netbeans/modules/web/jspparser/data/goldenfiles/ParseTest/testJSPIncludeJakarta.pass @@ -0,0 +1,183 @@ +--------- JspParserAPI.parseResult(), success: true + ---- PAGEINFO +----- PageInfo ----- + imports: + jakarta.servlet.* + jakarta.servlet.http.* + jakarta.servlet.jsp.* + dependants: + taglibsMap: + prefixMapper: + approxXmlPrefixMapper : + language : java + xtends : org.apache.jasper.runtime.HttpJspBase + contentType : text/html;charset=UTF-8 + session : true + buffer : 8192 + autoFlush : true + threadSafe : true + isErrorPage : false + errorPage : null + scriptless : true + scriptingInvalid : false + elIgnored : false + omitXmlDecl : null + isJspPrefixHijacked : false + doctypeName : null + doctypeSystem : null + doctypePublic : null + hasJspRoot : false + prefixes: + includePrelude: + includeCoda: + pluginDcls: + beans: + ------- XML View (constructed from the original data structure) ----- + + + + + + + + + + + + +]]> + + + + ]]> + + + + ]]> + + + + ]]> + + +JSP Page]]> + + + + ]]> + + + + ]]> + + + + ]]> + + + + + + + +]]> + + + +]]> + + + + ---- NODES + +Node [/jspInclude.jsp(1,5), Comment] <%-- + Document : jspInclude + Created on : Aug 21, 2007, 10:58:18 AM + Author : petr +--%> +Node [/jspInclude.jsp(5,4), TemplateText] + + +Node [/jspInclude.jsp(7,0), PageDirective] <%@ page contentType="text/html" pageEncoding="UTF-8"%> +Node [/jspInclude.jsp(7,54), TemplateText] + +Node [/jspInclude.jsp(8,0), TemplateText] + + +Node [/jspInclude.jsp(11,0), TemplateText] + +Node [/jspInclude.jsp(12,4), TemplateText] + +Node [/jspInclude.jsp(13,8), TemplateText] + +Node [/jspInclude.jsp(14,8), TemplateText] JSP Page +Node [/jspInclude.jsp(14,23), TemplateText] + +Node [/jspInclude.jsp(15,4), TemplateText] + +Node [/jspInclude.jsp(16,4), TemplateText] + +Node [/jspInclude.jsp(17,8), IncludeAction] +Node [/jspInclude.jsp(17,51), TemplateText] + +Node [/jspInclude.jsp(18,4), TemplateText] + +Node [/jspInclude.jsp(19,0), TemplateText] + diff --git a/enterprise/web.kit/nbproject/project.xml b/enterprise/web.kit/nbproject/project.xml index 34e7a828fe47..e70a96bf7649 100644 --- a/enterprise/web.kit/nbproject/project.xml +++ b/enterprise/web.kit/nbproject/project.xml @@ -29,7 +29,7 @@ org.netbeans.libs.jstl 1 - 2.31 + 2.66
@@ -81,30 +81,12 @@ 1.6 - org.netbeans.modules.j2ee.persistence.kit 1.0 - org.netbeans.modules.java.kit @@ -123,15 +105,6 @@ 1.0 - org.netbeans.modules.languages.apacheconf diff --git a/enterprise/web.project/nbproject/project.xml b/enterprise/web.project/nbproject/project.xml index b7bdf371568c..31ed601cd37e 100644 --- a/enterprise/web.project/nbproject/project.xml +++ b/enterprise/web.project/nbproject/project.xml @@ -426,7 +426,8 @@ - 3 + 4 + 4.0 diff --git a/enterprise/web.project/src/org/netbeans/modules/web/project/classpath/ClassPathProviderImpl.java b/enterprise/web.project/src/org/netbeans/modules/web/project/classpath/ClassPathProviderImpl.java index 85d78323e733..040993096e75 100644 --- a/enterprise/web.project/src/org/netbeans/modules/web/project/classpath/ClassPathProviderImpl.java +++ b/enterprise/web.project/src/org/netbeans/modules/web/project/classpath/ClassPathProviderImpl.java @@ -26,6 +26,7 @@ import java.util.HashMap; import org.netbeans.api.java.classpath.ClassPath; +import org.netbeans.api.java.classpath.JavaClassPathConstants; import org.netbeans.api.project.ProjectManager; import org.netbeans.api.project.SourceGroup; import org.netbeans.modules.java.api.common.SourceRoots; @@ -171,7 +172,10 @@ private synchronized ClassPath getCompileTimeClasspath(FileType type) { private synchronized ClassPath getRunTimeClasspath(FileType type) { if (type == FileType.WEB_SOURCE) { if (sourceRoots.getRoots().length > 0) { - return javaClassPathProvider.findClassPath(sourceRoots.getRoots()[0], ClassPath.EXECUTE); + return ClassPathSupport.createProxyClassPath( + javaClassPathProvider.findClassPath(sourceRoots.getRoots()[0], ClassPath.EXECUTE), + javaClassPathProvider.findClassPath(sourceRoots.getRoots()[0], JavaClassPathConstants.MODULE_EXECUTE_CLASS_PATH) + ); } else { ClassPath cp = cache.get(ClassPathCache.WEB_RUNTIME); if (cp == null) { diff --git a/enterprise/websvc.saas.codegen.j2ee/nbproject/project.xml b/enterprise/websvc.saas.codegen.j2ee/nbproject/project.xml index 4c6ed1e03a6d..fbf5ef686562 100644 --- a/enterprise/websvc.saas.codegen.j2ee/nbproject/project.xml +++ b/enterprise/websvc.saas.codegen.j2ee/nbproject/project.xml @@ -99,8 +99,8 @@ - 3 - 3.2 + 4 + 4.0 @@ -239,7 +239,7 @@ - org.openide.util.ui + org.openide.util @@ -247,19 +247,19 @@ - org.openide.util + org.openide.util.lookup - 9.3 + 8.0 - org.openide.util.lookup + org.openide.util.ui - 8.0 + 9.3
diff --git a/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ignored-overlaps b/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ignored-overlaps index c8aa1c6eb98d..f95d0bb6bc64 100644 --- a/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ignored-overlaps +++ b/nbbuild/antsrc/org/netbeans/nbbuild/extlibs/ignored-overlaps @@ -122,4 +122,6 @@ ide/libs.graalsdk/external/word-24.0.0.jar ide/libs.graalsdk.system/external/wor # Intentionally duplicated (in web.jspparser only as unittest dependency and copied to make license handling easier) enterprise/web.jspparser/external/jakarta.servlet.jsp.jstl-api-1.2.7.jar enterprise/libs.jstl/external/jakarta.servlet.jsp.jstl-api-1.2.7.jar enterprise/web.jspparser/external/jakarta.servlet.jsp.jstl-1.2.6.jar enterprise/libs.jstl/external/jakarta.servlet.jsp.jstl-1.2.6.jar +enterprise/web.jspparser/external/jakarta.servlet.jsp.jstl-api-3.0.2.jar enterprise/libs.jstl/external/jakarta.servlet.jsp.jstl-api-3.0.2.jar +enterprise/web.jspparser/external/jakarta.servlet.jsp.jstl-3.0.1.jar enterprise/libs.jstl/external/jakarta.servlet.jsp.jstl-3.0.1.jar enterprise/web.jspparser/external/commons-logging-1.3.1.jar platform/o.apache.commons.logging/external/commons-logging-1.3.1.jar \ No newline at end of file diff --git a/nbbuild/l10n.patterns b/nbbuild/l10n.patterns index 7c131fda9fbf..97aa8c15b6d7 100644 --- a/nbbuild/l10n.patterns +++ b/nbbuild/l10n.patterns @@ -66,6 +66,7 @@ exclude **/FastInfoset.jar: exclude **/appframework-1.0.3.jar: exclude **/shale-remoting-1.0.4.jar: exclude **/jsp-parser-ext.jar: +exclude **/jsp-parser-ext-jakarta.jar: exclude **/groovy-all.jar: exclude **/dynalang-0.3.jar: exclude **/itext-2.0.5.jar: