diff --git a/.asf.yaml b/.asf.yaml index 379309b9a..f2d361b61 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -12,3 +12,7 @@ notifications: github: del_branch_on_merge: true + protected_branches: + master: { } + autolink_jira: + - WW diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 000000000..cc9af2b6d --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,55 @@ +# 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. + +name: "CodeQL" + +on: + push: + branches: [ "master" ] + pull_request: + +permissions: + # Needed to upload the results to code-scanning dashboard. + security-events: write + actions: read + contents: read + # Needed to access OIDC token. + id-token: write + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + strategy: + fail-fast: false + matrix: + language: [ 'java' ] + steps: + - name: Checkout repository + uses: actions/checkout@v3 + - name: Initialize CodeQL + uses: github/codeql-action/init@v2 + with: + languages: ${{ matrix.language }} + - name: Autobuild + uses: github/codeql-action/autobuild@v2 + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v2 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 000000000..7218879ba --- /dev/null +++ b/.github/workflows/maven.yml @@ -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. + +name: Java Build + +on: + pull_request: + push: + branches: + - master + +permissions: read-all + +env: + MAVEN_OPTS: -Xmx2048m -Xms1024m + LANG: en_US.utf8 + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ '8', '11', '17' ] + steps: + - name: Checkout code + uses: actions/checkout@v3.0.2 + - name: Set up cache + uses: actions/cache@v3.0.8 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + - name: Set up JDK ${{ matrix.java }} + uses: actions/setup-java@v3 + with: + distribution: adopt + java-version: ${{ matrix.java }} + - name: Build with Maven on Java ${{ matrix.java }} + if: matrix.java != '11' + run: mvn -B -V -DskipAssembly test --no-transfer-progress + - name: Code coverage on Java ${{ matrix.java }} + if: matrix.java == '11' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + SONAR_TOKEN: ${{ secrets.SONARCLOUD_TOKEN }} + run: mvn -B -V -Pcoverage -DskipAssembly verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar --no-transfer-progress diff --git a/.github/workflows/scorecards-analysis.yaml b/.github/workflows/scorecards-analysis.yaml new file mode 100644 index 000000000..c8b4c85cc --- /dev/null +++ b/.github/workflows/scorecards-analysis.yaml @@ -0,0 +1,69 @@ +# 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. + +name: "Scorecards supply-chain security" + +on: + branch_protection_rule: + schedule: + - cron: "30 1 * * 6" # Weekly on Saturdays + push: + branches: [ "master" ] + +permissions: read-all + +jobs: + + analysis: + + name: "Scorecards analysis" + runs-on: ubuntu-latest + permissions: + # Needed to upload the results to the code-scanning dashboard. + security-events: write + actions: read + id-token: write # This is required for requesting the JWT + contents: read # This is required for actions/checkout + + steps: + + - name: "Checkout code" + uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # 3.1.0 + with: + persist-credentials: false + + - name: "Run analysis" + uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # 2.0.6 + with: + results_file: results.sarif + results_format: sarif + # A read-only PAT token, which is sufficient for the action to function. + # The relevant discussion: https://github.com/ossf/scorecard-action/issues/188 + repo_token: ${{ secrets.GITHUB_TOKEN }} + # Publish the results for public repositories to enable scorecard badges. + # For more details: https://github.com/ossf/scorecard-action#publishing-results + publish_results: true + + - name: "Upload artifact" + uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # 3.1.0 + with: + name: SARIF file + path: results.sarif + retention-days: 5 + + - name: "Upload to code-scanning" + uses: github/codeql-action/upload-sarif@b398f525a5587552e573b247ac661067fafa920b # 2.1.22 + with: + sarif_file: results.sarif diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5fb7347f5..000000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ -dist: trusty -language: java -sudo: false - -jdk: - - oraclejdk9 - - oraclejdk11 - -install: true - -env: -global: - - secure: iI7IpfDtS+LUyS2yNuRCR3KelNyvBHuoMQ3gb1UNmR5SSL7jO/p3olQWrQROs28FJ+dpE3lHyIjoHrebKQGJHHAgTG2XWxn+G3fDsf+wSSFSLoDGj0o2SgGXooBbR2dccnNZHCyQaOyE2cIPWaOxrQZFE4No70LQB4mrP/gdkoc= -matrix: - include: - - jdk: oraclejdk8 - env: STRUTS_IT=true # do integration tests and coverage reports when jdk 9 and 11 tests prospered - -script: - - if [ "$STRUTS_IT" == "true" ]; then - ./mvnw clean install -DskipTests -DskipAssembly -B; - ./mvnw test org.jacoco:jacoco-maven-plugin:report org.jacoco:jacoco-maven-plugin:report-integration org.eluder.coveralls:coveralls-maven-plugin:report -Ptravis-coveralls -DskipAssembly -B; - else - ./mvnw clean package test -DskipAssembly -B; - fi; - -cache: - directories: - - $HOME/.m2 diff --git a/Jenkinsfile b/Jenkinsfile index 233ade32d..1a5c56c20 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -79,7 +79,7 @@ pipeline { } stage('Test') { steps { - sh './mvnw -B test' + sh './mvnw -B verify -Pcoverage -DskipAssembly' } post { always { @@ -94,7 +94,7 @@ pipeline { } steps { withCredentials([string(credentialsId: 'asf-struts-sonarcloud', variable: 'SONARCLOUD_TOKEN')]) { - sh './mvnw sonar:sonar -DskipAssembly -Dsonar.login=${SONARCLOUD_TOKEN}' + sh './mvnw -B -Pcoverage -DskipAssembly -Dsonar.login=${SONARCLOUD_TOKEN} verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar' } } } @@ -160,6 +160,7 @@ pipeline { branch 'master' } steps { + sh './mvnw -B package -DskipTests' sshPublisher(publishers: [ sshPublisherDesc( configName: 'Nightlies', @@ -167,7 +168,8 @@ pipeline { sshTransfer( remoteDirectory: '/struts/snapshot', removePrefix: 'assembly/target/assembly/out', - sourceFiles: 'assembly/target/assembly/out/struts-*.zip' + sourceFiles: 'assembly/target/assembly/out/struts-*.zip', + cleanRemote: true ) ], verbose: true diff --git a/README.md b/README.md index 04ecf1d57..ca6366563 100644 --- a/README.md +++ b/README.md @@ -17,11 +17,13 @@ The Apache Struts web framework ------------------------------- -[![Build Status @ Jenkins](https://builds.apache.org/buildStatus/icon?job=Struts%2FStruts+Core%2Fmaster)](https://ci-builds.apache.org/job/Struts/job/Struts%20Core/job/master/) -[![Build Status @ Travis](https://travis-ci.com/apache/struts.svg?branch=master)](https://app.travis-ci.com/apache/struts) +[![Jenkins Build](https://builds.apache.org/buildStatus/icon?job=Struts%2FStruts+Core%2Fmaster)](https://ci-builds.apache.org/job/Struts/job/Struts%20Core/job/master/) +[![Java Build](https://github.com/apache/struts/actions/workflows/maven.yml/badge.svg)](https://github.com/apache/struts/actions/workflows/maven.yml) [![Maven Central](https://maven-badges.herokuapp.com/maven-central/org.apache.struts/struts2-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/org.apache.struts/struts2-core/) [![Javadocs](https://javadoc.io/badge/org.apache.struts/struts2-core.svg)](https://javadoc.io/doc/org.apache.struts/struts2-core) -[![Coverage Status](https://coveralls.io/repos/github/apache/struts/badge.svg)](https://coveralls.io/github/apache/struts) +[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=apache_struts&metric=coverage)](https://sonarcloud.io/summary/new_code?id=apache_struts) +[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/apache/struts/badge)](https://deps.dev/maven/org.apache.struts%3Astruts2-core) +[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/6618/badge)](https://bestpractices.coreinfrastructure.org/projects/6618) [![License](http://img.shields.io/:license-apache-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0.html) The Apache Struts web framework is a free open-source solution for creating Java web applications. diff --git a/SECURITY.md b/SECURITY.md index 393fe23d4..eca65f01b 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -7,8 +7,8 @@ and what potential vulnerability it can have: | Version | Supported | | ------- | ------------------ | -| 2.5.20 | :white_check_mark: | -| 2.3.37 | :white_check_mark: | +| 6.0.0 | :white_check_mark: | +| 2.5.30 | :white_check_mark: | ## Reporting New Security Issues with thr Apache Struts diff --git a/apps/README.md b/apps/README.md new file mode 100644 index 000000000..0036a0d3a --- /dev/null +++ b/apps/README.md @@ -0,0 +1,12 @@ +# Struts 2 Apps +These module consists of two example applications, which were built using the Apache Struts project. +One is an old-fashioned Web application and another is a modern REST based single page app. + +## Installation +Enter a given folder, either `showcase/` or `rest-showcase/` and start the app using Maven: + +``` +mvn jetty:run +``` + +then open your browser at http://localhost:8080 and navigate to a proper context. diff --git a/apps/pom.xml b/apps/pom.xml index ab8a81107..680462941 100644 --- a/apps/pom.xml +++ b/apps/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-parent - 6.1.0-SNAPSHOT + 6.2.0-SNAPSHOT struts2-apps pom diff --git a/apps/rest-showcase/pom.xml b/apps/rest-showcase/pom.xml index 870683b81..8f54406ae 100644 --- a/apps/rest-showcase/pom.xml +++ b/apps/rest-showcase/pom.xml @@ -24,12 +24,12 @@ org.apache.struts struts2-apps - 6.1.0-SNAPSHOT + 6.2.0-SNAPSHOT struts2-rest-showcase war - 6.1.0-SNAPSHOT + 6.2.0-SNAPSHOT Struts 2 Rest Showcase Webapp Struts 2 Rest Showcase Example @@ -125,6 +125,7 @@ maven-surefire-plugin + @{argLine} it/** **/*$* diff --git a/apps/rest-showcase/src/main/resources/struts.xml b/apps/rest-showcase/src/main/resources/struts.xml index a8991da66..b4515186f 100644 --- a/apps/rest-showcase/src/main/resources/struts.xml +++ b/apps/rest-showcase/src/main/resources/struts.xml @@ -21,7 +21,7 @@ --> + "https://struts.apache.org/dtds/struts-2.5.dtd"> @@ -41,4 +41,4 @@ index,show,create,update,destroy,deleteConfirm,edit,editNew - \ No newline at end of file + diff --git a/apps/showcase/pom.xml b/apps/showcase/pom.xml index 51b87ae26..cc6d51d5e 100644 --- a/apps/showcase/pom.xml +++ b/apps/showcase/pom.xml @@ -24,7 +24,7 @@ org.apache.struts struts2-apps - 6.1.0-SNAPSHOT + 6.2.0-SNAPSHOT struts2-showcase @@ -99,6 +99,11 @@ struts2-velocity-plugin + + org.apache.struts + struts2-xslt-plugin + + javax.servlet javax.servlet-api @@ -237,6 +242,7 @@ maven-surefire-plugin + @{argLine} it/** **/*$* diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/servlet/TestServlet.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/servlet/TestServlet.java new file mode 100644 index 000000000..f754bd3a6 --- /dev/null +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/servlet/TestServlet.java @@ -0,0 +1,41 @@ +/* + * $Id$ + * + * 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.apache.struts2.showcase.servlet; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; + +public class TestServlet extends HttpServlet { + @Override + public void service(HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { + switch (request.getPathInfo()) { + case "/forward": + getServletContext().getRequestDispatcher("/dispatcher/dispatch.action").forward(request, response); + break; + default: + response.sendError(404); + break; + } + } +} diff --git a/apps/showcase/src/main/java/org/apache/struts2/showcase/wait/ThreadPoolExecutorProvider.java b/apps/showcase/src/main/java/org/apache/struts2/showcase/wait/ThreadPoolExecutorProvider.java new file mode 100644 index 000000000..ffffc7a1d --- /dev/null +++ b/apps/showcase/src/main/java/org/apache/struts2/showcase/wait/ThreadPoolExecutorProvider.java @@ -0,0 +1,56 @@ +/* + * 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.apache.struts2.showcase.wait; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; +import org.apache.struts2.interceptor.exec.ExecutorProvider; + +import java.util.concurrent.ExecutorService; +import java.util.concurrent.LinkedBlockingDeque; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.concurrent.TimeUnit; + +public class ThreadPoolExecutorProvider implements ExecutorProvider { + + private static final Logger LOG = LogManager.getLogger(ThreadPoolExecutorProvider.class); + + private final ExecutorService executor; + + public ThreadPoolExecutorProvider() { + this.executor = new ThreadPoolExecutor(1, 2, 0L, TimeUnit.MILLISECONDS, new LinkedBlockingDeque<>()); + } + + @Override + public void execute(Runnable task) { + LOG.info("Executing task: {}", task); + executor.execute(task); + } + + @Override + public boolean isShutdown() { + return executor.isShutdown(); + } + + @Override + public void shutdown() { + LOG.info("Shutting down executor"); + executor.shutdown(); + } +} diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/LotsOfRichtexteditorAction-lotsOfRichtexteditorSubmit-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/LotsOfRichtexteditorAction-lotsOfRichtexteditorSubmit-validation.xml index 07a7e5d7b..1c63b912f 100644 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/LotsOfRichtexteditorAction-lotsOfRichtexteditorSubmit-validation.xml +++ b/apps/showcase/src/main/resources/org/apache/struts2/showcase/LotsOfRichtexteditorAction-lotsOfRichtexteditorSubmit-validation.xml @@ -21,31 +21,31 @@ --> - + "https://struts.apache.org/dtds/xwork-validator-1.0.2.dtd"> + Description1 Is Required !!! - + Description2 Is Required !!! - + Description3 Is Required !!! - + Description4 Is Required !!! - - + + diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/action/EmployeeAction-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/action/EmployeeAction-validation.xml index 2fb09bc77..a19d0449d 100644 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/action/EmployeeAction-validation.xml +++ b/apps/showcase/src/main/resources/org/apache/struts2/showcase/action/EmployeeAction-validation.xml @@ -19,7 +19,7 @@ * under the License. */ --> - + diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/action/SkillAction-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/action/SkillAction-validation.xml index 0c0929ff2..5c2574a4d 100644 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/action/SkillAction-validation.xml +++ b/apps/showcase/src/main/resources/org/apache/struts2/showcase/action/SkillAction-validation.xml @@ -19,7 +19,7 @@ * under the License. */ --> - + diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/fileupload/FileUploadAction-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/fileupload/FileUploadAction-validation.xml index cfd41786e..e15b2506f 100644 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/fileupload/FileUploadAction-validation.xml +++ b/apps/showcase/src/main/resources/org/apache/struts2/showcase/fileupload/FileUploadAction-validation.xml @@ -21,7 +21,7 @@ --> + "https://struts.apache.org/dtds/xwork-validator-1.0.2.dtd"> @@ -35,5 +35,4 @@ Caption cannot be empty - - \ No newline at end of file + diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/person/NewPersonAction-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/person/NewPersonAction-validation.xml index a3f63fc5d..0bd8abe33 100644 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/person/NewPersonAction-validation.xml +++ b/apps/showcase/src/main/resources/org/apache/struts2/showcase/person/NewPersonAction-validation.xml @@ -19,7 +19,7 @@ * under the License. */ --> - + diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/person/Person-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/person/Person-validation.xml index 8cdef7094..425d4154f 100644 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/person/Person-validation.xml +++ b/apps/showcase/src/main/resources/org/apache/struts2/showcase/person/Person-validation.xml @@ -19,7 +19,7 @@ * under the License. */ --> - + diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/tag/nonui/iteratortag/IteratorGeneratorTagDemo-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/tag/nonui/iteratortag/IteratorGeneratorTagDemo-validation.xml index 44eb0032f..07f1ea9ad 100644 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/tag/nonui/iteratortag/IteratorGeneratorTagDemo-validation.xml +++ b/apps/showcase/src/main/resources/org/apache/struts2/showcase/tag/nonui/iteratortag/IteratorGeneratorTagDemo-validation.xml @@ -21,8 +21,8 @@ --> - + "https://struts.apache.org/dtds/xwork-validator-1.0.2.dtd"> + @@ -30,13 +30,13 @@ Value must not be empty - - + + Count must be an integer - + - + diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/FieldValidatorsExampleAction-submitClientSideValidationExample-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/FieldValidatorsExampleAction-submitClientSideValidationExample-validation.xml index 0beb7e3a9..2d732c0ab 100644 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/FieldValidatorsExampleAction-submitClientSideValidationExample-validation.xml +++ b/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/FieldValidatorsExampleAction-submitClientSideValidationExample-validation.xml @@ -21,10 +21,10 @@ --> - - - + "https://struts.apache.org/dtds/xwork-validator-1.0.2.dtd"> + + + diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/FieldValidatorsExampleAction-submitFieldValidatorsExamples-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/FieldValidatorsExampleAction-submitFieldValidatorsExamples-validation.xml index 5d23023bb..4def409bb 100644 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/FieldValidatorsExampleAction-submitFieldValidatorsExamples-validation.xml +++ b/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/FieldValidatorsExampleAction-submitFieldValidatorsExamples-validation.xml @@ -19,12 +19,12 @@ * under the License. */ --> - - - - + "https://struts.apache.org/dtds/xwork-validator-1.0.2.dtd"> + + + diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/NonFieldValidatorsExampleAction-submitNonFieldValidatorsExamples-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/NonFieldValidatorsExampleAction-submitNonFieldValidatorsExamples-validation.xml index 92fb2313e..a94a9e2ff 100644 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/NonFieldValidatorsExampleAction-submitNonFieldValidatorsExamples-validation.xml +++ b/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/NonFieldValidatorsExampleAction-submitNonFieldValidatorsExamples-validation.xml @@ -19,13 +19,13 @@ * under the License. */ --> - - - - - + "https://struts.apache.org/dtds/xwork-validator-1.0.2.dtd"> + + + + diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/QuizAction-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/QuizAction-validation.xml index 411612fd1..8f7a48604 100644 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/QuizAction-validation.xml +++ b/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/QuizAction-validation.xml @@ -19,11 +19,11 @@ * under the License. */ --> - + diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/SubmitApplication-submitApplication-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/SubmitApplication-submitApplication-validation.xml index d6ef55067..492475df6 100644 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/SubmitApplication-submitApplication-validation.xml +++ b/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/SubmitApplication-submitApplication-validation.xml @@ -21,7 +21,7 @@ --> + "https://struts.apache.org/dtds/xwork-validator-1.0.2.dtd"> diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/User-userContext-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/User-userContext-validation.xml index 1020aa60a..1e3dd4c6c 100644 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/User-userContext-validation.xml +++ b/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/User-userContext-validation.xml @@ -19,17 +19,17 @@ * under the License. */ --> - - + "https://struts.apache.org/dtds/xwork-validator-1.0.2.dtd"> + Name Required - + 1 100 @@ -41,6 +41,6 @@ Birthday Required - + diff --git a/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/VisitorValidatorsExampleAction-submitVisitorValidatorsExamples-validation.xml b/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/VisitorValidatorsExampleAction-submitVisitorValidatorsExamples-validation.xml index 7e24f4bb2..cb4a8138f 100644 --- a/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/VisitorValidatorsExampleAction-submitVisitorValidatorsExamples-validation.xml +++ b/apps/showcase/src/main/resources/org/apache/struts2/showcase/validation/VisitorValidatorsExampleAction-submitVisitorValidatorsExamples-validation.xml @@ -19,10 +19,10 @@ * under the License. */ --> - - + "https://struts.apache.org/dtds/xwork-validator-1.0.2.dtd"> + diff --git a/apps/showcase/src/main/resources/struts-actionchaining.xml b/apps/showcase/src/main/resources/struts-actionchaining.xml index f140f9e96..2b187dd72 100644 --- a/apps/showcase/src/main/resources/struts-actionchaining.xml +++ b/apps/showcase/src/main/resources/struts-actionchaining.xml @@ -21,12 +21,12 @@ --> - + "https://struts.apache.org/dtds/struts-2.5.dtd"> + - actionChain2 + actionChain2 actionChain3 diff --git a/apps/showcase/src/main/resources/struts-async.xml b/apps/showcase/src/main/resources/struts-async.xml index faa38656c..0921e6832 100644 --- a/apps/showcase/src/main/resources/struts-async.xml +++ b/apps/showcase/src/main/resources/struts-async.xml @@ -21,7 +21,7 @@ --> + "https://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-conversion.xml b/apps/showcase/src/main/resources/struts-conversion.xml index a3c147bd6..4c4c1658a 100644 --- a/apps/showcase/src/main/resources/struts-conversion.xml +++ b/apps/showcase/src/main/resources/struts-conversion.xml @@ -21,15 +21,15 @@ --> - + "https://struts.apache.org/dtds/struts-2.5.dtd"> + - + /WEB-INF/conversion/index.jsp - + @@ -49,8 +49,8 @@ /WEB-INF/conversion/Person.java.txt - - + + /WEB-INF/conversion/enterAddressInfo.jsp @@ -68,9 +68,9 @@ /WEB-INF/conversion/Address.java.txt - - - + + + /WEB-INF/conversion/enterOperations.jsp @@ -93,6 +93,6 @@ /WEB-INF/conversion/OperationsEnumActionConversion.txt - + - + diff --git a/apps/showcase/src/main/resources/struts-dispatcher.xml b/apps/showcase/src/main/resources/struts-dispatcher.xml index 0a89502fe..7051b1f3c 100644 --- a/apps/showcase/src/main/resources/struts-dispatcher.xml +++ b/apps/showcase/src/main/resources/struts-dispatcher.xml @@ -21,7 +21,7 @@ --> + "https://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-filedownload.xml b/apps/showcase/src/main/resources/struts-filedownload.xml index 56d083f0a..335777bd4 100644 --- a/apps/showcase/src/main/resources/struts-filedownload.xml +++ b/apps/showcase/src/main/resources/struts-filedownload.xml @@ -21,7 +21,7 @@ --> + "https://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-fileupload.xml b/apps/showcase/src/main/resources/struts-fileupload.xml index 33be370ba..4efcad89f 100644 --- a/apps/showcase/src/main/resources/struts-fileupload.xml +++ b/apps/showcase/src/main/resources/struts-fileupload.xml @@ -21,11 +21,11 @@ --> + "https://struts.apache.org/dtds/struts-2.5.dtd"> - + /WEB-INF/fileupload/upload.jsp @@ -34,11 +34,11 @@ /WEB-INF/fileupload/upload.jsp /WEB-INF/fileupload/upload-success.jsp - + /WEB-INF/fileupload/multipleUploadUsingList.jsp - + /WEB-INF/fileupload/multipleUploadUsingList.jsp /WEB-INF/fileupload/multiple-success.jsp diff --git a/apps/showcase/src/main/resources/struts-freemarker.xml b/apps/showcase/src/main/resources/struts-freemarker.xml index 26ee8aedc..c0de0a92a 100644 --- a/apps/showcase/src/main/resources/struts-freemarker.xml +++ b/apps/showcase/src/main/resources/struts-freemarker.xml @@ -21,16 +21,16 @@ --> + "https://struts.apache.org/dtds/struts-2.5.dtd"> /WEB-INF/freemarker/customFreemarkerManagerUsage.ftl - + /WEB-INF/freemarker/standardTags.ftl - + diff --git a/apps/showcase/src/main/resources/struts-hangman.xml b/apps/showcase/src/main/resources/struts-hangman.xml index ee1f4f6a1..d81f4b368 100644 --- a/apps/showcase/src/main/resources/struts-hangman.xml +++ b/apps/showcase/src/main/resources/struts-hangman.xml @@ -21,7 +21,7 @@ --> + "https://struts.apache.org/dtds/struts-2.5.dtd"> @@ -41,9 +41,9 @@ /WEB-INF/hangman/hangmanNonAjax.ftl - - - + + + /WEB-INF/hangman/blank.ftl @@ -61,4 +61,4 @@ /WEB-INF/hangman/updateGuessLeft.ftl - + diff --git a/apps/showcase/src/main/resources/struts-interactive.xml b/apps/showcase/src/main/resources/struts-interactive.xml index ad584a17a..cda563df5 100644 --- a/apps/showcase/src/main/resources/struts-interactive.xml +++ b/apps/showcase/src/main/resources/struts-interactive.xml @@ -21,7 +21,7 @@ --> + "https://struts.apache.org/dtds/struts-2.5.dtd"> @@ -38,4 +38,4 @@ - \ No newline at end of file + diff --git a/apps/showcase/src/main/resources/struts-model-driven.xml b/apps/showcase/src/main/resources/struts-model-driven.xml index c8731e980..da01d922e 100644 --- a/apps/showcase/src/main/resources/struts-model-driven.xml +++ b/apps/showcase/src/main/resources/struts-model-driven.xml @@ -21,7 +21,7 @@ --> + "https://struts.apache.org/dtds/struts-2.5.dtd"> @@ -29,11 +29,10 @@ /WEB-INF/modelDriven/modelDriven.jsp - + /WEB-INF/modelDriven/modelDrivenResult.jsp - - \ No newline at end of file + diff --git a/apps/showcase/src/main/resources/struts-person.xml b/apps/showcase/src/main/resources/struts-person.xml index 946c4c104..a1500888d 100644 --- a/apps/showcase/src/main/resources/struts-person.xml +++ b/apps/showcase/src/main/resources/struts-person.xml @@ -21,7 +21,7 @@ --> + "https://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-tags-non-ui.xml b/apps/showcase/src/main/resources/struts-tags-non-ui.xml index 42d0506ae..f445da037 100644 --- a/apps/showcase/src/main/resources/struts-tags-non-ui.xml +++ b/apps/showcase/src/main/resources/struts-tags-non-ui.xml @@ -21,14 +21,14 @@ --> - + "https://struts.apache.org/dtds/struts-2.5.dtd"> + - + - + /WEB-INF/tags/non-ui/actionTag/showActionTagDemo.jsp @@ -46,11 +46,11 @@ /WEB-INF/tags/non-ui/actionTag/showActionTagDemo.jsp - + - + /WEB-INF/tags/non-ui/iteratorTag/showIteratorGeneratorTagDemo.jsp @@ -60,8 +60,8 @@ /WEB-INF/tags/non-ui/iteratorTag/iteratorGeneratorTagDemoResult.jsp - - + + @@ -74,8 +74,8 @@ /WEB-INF/tags/non-ui/iteratorTag/appendIteratorTagDemoResult.jsp - - + + @@ -88,7 +88,7 @@ /WEB-INF/tags/non-ui/iteratorTag/mergeIteratorTagDemoResult.jsp - + @@ -101,14 +101,14 @@ /WEB-INF/tags/non-ui/iteratorTag/subsetIteratorTagDemoResult.jsp - + /WEB-INF/tags/non-ui/actionPrefix/actionPrefixExample.ftl - + /WEB-INF/tags/non-ui/actionPrefix/normalSubmit.ftl @@ -131,7 +131,7 @@ /WEB-INF/tags/non-ui/actionPrefix/actionPrefixExample.ftl - + diff --git a/apps/showcase/src/main/resources/struts-tags-ui.xml b/apps/showcase/src/main/resources/struts-tags-ui.xml index 13e33d65b..1055678ad 100644 --- a/apps/showcase/src/main/resources/struts-tags-ui.xml +++ b/apps/showcase/src/main/resources/struts-tags-ui.xml @@ -21,7 +21,7 @@ --> + "https://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-tags.xml b/apps/showcase/src/main/resources/struts-tags.xml index b2896dace..c9482f10f 100644 --- a/apps/showcase/src/main/resources/struts-tags.xml +++ b/apps/showcase/src/main/resources/struts-tags.xml @@ -21,7 +21,7 @@ --> + "https://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-tiles.xml b/apps/showcase/src/main/resources/struts-tiles.xml index 6845710dc..5fa2f8071 100644 --- a/apps/showcase/src/main/resources/struts-tiles.xml +++ b/apps/showcase/src/main/resources/struts-tiles.xml @@ -21,7 +21,7 @@ --> + "https://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-token.xml b/apps/showcase/src/main/resources/struts-token.xml index 5f41d1a31..db6704168 100644 --- a/apps/showcase/src/main/resources/struts-token.xml +++ b/apps/showcase/src/main/resources/struts-token.xml @@ -21,7 +21,7 @@ --> + "https://struts.apache.org/dtds/struts-2.5.dtd"> diff --git a/apps/showcase/src/main/resources/struts-validation.xml b/apps/showcase/src/main/resources/struts-validation.xml index 23d662f55..31bcab48f 100755 --- a/apps/showcase/src/main/resources/struts-validation.xml +++ b/apps/showcase/src/main/resources/struts-validation.xml @@ -21,8 +21,8 @@ --> - + "https://struts.apache.org/dtds/struts-2.5.dtd"> + @@ -74,7 +74,7 @@ /WEB-INF/validation/ajaxFormSubmitSuccess.jsp - + @@ -83,46 +83,46 @@ index.jsp - - + + - + /WEB-INF/validation/fieldValidatorsExample.jsp - + /WEB-INF/validation/fieldValidatorsExample.jsp /WEB-INF/validation/successFieldValidatorsExample.jsp - - - + + + - + /WEB-INF/validation/nonFieldValidatorsExample.jsp - + /WEB-INF/validation/nonFieldValidatorsExample.jsp /WEB-INF/validation/successNonFieldValidatorsExample.jsp - - - + + + - + /WEB-INF/validation/visitorValidatorsExample.jsp - + /WEB-INF/validation/visitorValidatorsExample.jsp /WEB-INF/validation/successVisitorValidatorsExample.jsp @@ -146,7 +146,7 @@ - + STORE @@ -173,7 +173,7 @@ /WEB-INF/validation/storeErrorsAcrossRequestCancel.jsp - + - + diff --git a/apps/showcase/src/main/resources/struts-wait.xml b/apps/showcase/src/main/resources/struts-wait.xml index 273e8e550..b237dac68 100644 --- a/apps/showcase/src/main/resources/struts-wait.xml +++ b/apps/showcase/src/main/resources/struts-wait.xml @@ -21,10 +21,17 @@ --> + "https://struts.apache.org/dtds/struts-2.5.dtd"> + + + + + + /WEB-INF/wait/index.jsp + /WEB-INF/wait/example1.jsp diff --git a/apps/showcase/src/main/resources/struts-xslt.xml b/apps/showcase/src/main/resources/struts-xslt.xml index 5bbdc55b5..663e84e93 100644 --- a/apps/showcase/src/main/resources/struts-xslt.xml +++ b/apps/showcase/src/main/resources/struts-xslt.xml @@ -20,11 +20,11 @@ */ --> + "-//Apache Software Foundation//DTD Struts Configuration 6.0//EN" + "https://struts.apache.org/dtds/struts-6.0.dtd"> - + @@ -36,7 +36,7 @@ info.classpath - + info diff --git a/apps/showcase/src/main/resources/struts.xml b/apps/showcase/src/main/resources/struts.xml index cfdac4b39..6354a3657 100644 --- a/apps/showcase/src/main/resources/struts.xml +++ b/apps/showcase/src/main/resources/struts.xml @@ -21,7 +21,7 @@ --> + "https://struts.apache.org/dtds/struts-2.5.dtd"> @@ -44,7 +44,7 @@ - + diff --git a/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp b/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp index d63f61f9a..77f387ace 100644 --- a/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp +++ b/apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp @@ -64,14 +64,14 @@ <decorator:title default="Struts2 Showcase"/> - + - + - + - + $(function () { var alerts = $('ul.alert').wrap('
'); @@ -82,19 +82,22 @@ - + - + + + jQuery(document).ready(function() { prettyPrint(); } ); + - +