[struts] 01/01: Merge pull request #571 from apache/WW-5190-match-action-proxy
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit f3cb89202dbe30fae2af27d68a49b0c7d8a77b21 Merge: 836a27692 cb5997490 Author: Lukasz Lenart AuthorDate: Mon Jul 11 10:25:16 2022 +0200 Merge pull request #571 from apache/WW-5190-match-action-proxy [WW-5190] Fixes StackOverflowException when dispatching request apps/showcase/pom.xml | 9 +- .../struts2/showcase/source/ViewSourceAction.java | 385 ++--- apps/showcase/src/main/resources/log4j2.xml| 9 +- .../{log4j2.xml => struts-dispatcher.xml} | 36 +- apps/showcase/src/main/resources/struts.xml| 2 + .../src/main/webapp/WEB-INF/decorators/main.jsp| 2 + .../webapp/WEB-INF/dispatcher/dispatch-result.jsp | 42 +++ .../src/main/webapp/WEB-INF/viewSource.jsp | 75 ++-- apps/showcase/src/main/webapp/WEB-INF/web.xml | 27 +- .../struts2/showcase/DispatcherResultTest.java | 56 +++ .../org/apache/struts2/dispatcher/Dispatcher.java | 49 ++- .../filter/StrutsPrepareAndExecuteFilter.java | 8 +- .../dispatcher/mapper/DefaultActionMapper.java | 120 --- .../apache/struts2/dispatcher/DispatcherTest.java | 198 ++- 14 files changed, 589 insertions(+), 429 deletions(-)
[struts] branch master updated (836a27692 -> f3cb89202)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git from 836a27692 Merge pull request #578 from sepe81/update-jasperreports add 5af840b16 WW-5190 Extracts method name from config for known action name add 1c2b491a2 WW-5190 Reuses action proxy if namespace, name and method are match add 69102e907 WW-5190 Uses wrapped request only when processing request by Struts add a6a452950 Fixes logging in Showcase app add 06290cef9 Fixes showing configuration of an action in Showcase app add 957292ecd Simplifies logging pattern in Showcase app add ebe1b80ed WW-5190 Adds a new test to cover new logic of comparing ActionProxies add 8e468a368 WW-5190 Defines two examples with Dispatcher result and integration tests add d639b59f6 Merge branch 'master' into WW-5190-match-action-proxy add 8c37b1523 WW-5190 Uses proper order of servlets and filters add ecfdee137 WW-5190 Disables test which won't pass without refactoring the prepare and execute filters add cb5997490 WW-5190 Marks all Struts related filters with new f3cb89202 Merge pull request #571 from apache/WW-5190-match-action-proxy The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: apps/showcase/pom.xml | 9 +- .../struts2/showcase/source/ViewSourceAction.java | 385 ++--- apps/showcase/src/main/resources/log4j2.xml| 9 +- .../src/main/resources/struts-dispatcher.xml | 16 +- apps/showcase/src/main/resources/struts.xml| 2 + .../src/main/webapp/WEB-INF/decorators/main.jsp| 2 + .../webapp/WEB-INF/dispatcher/dispatch-result.jsp | 42 +++ .../src/main/webapp/WEB-INF/viewSource.jsp | 75 ++-- apps/showcase/src/main/webapp/WEB-INF/web.xml | 27 +- ...rManagerTest.java => DispatcherResultTest.java} | 39 +-- .../org/apache/struts2/dispatcher/Dispatcher.java | 49 ++- .../filter/StrutsPrepareAndExecuteFilter.java | 8 +- .../dispatcher/mapper/DefaultActionMapper.java | 120 --- .../apache/struts2/dispatcher/DispatcherTest.java | 198 ++- 14 files changed, 540 insertions(+), 441 deletions(-) copy plugins/junit/src/test/resources/struts-convention-configuration.xml => apps/showcase/src/main/resources/struts-dispatcher.xml (73%) create mode 100644 apps/showcase/src/main/webapp/WEB-INF/dispatcher/dispatch-result.jsp copy apps/showcase/src/test/java/it/org/apache/struts2/showcase/{FreeMarkerManagerTest.java => DispatcherResultTest.java} (54%)
[struts] branch master updated (f3cb89202 -> 42e3da550)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git from f3cb89202 Merge pull request #571 from apache/WW-5190-match-action-proxy add e6c1cec7f WW-5192 Fixes brok radio tag when using with enums add b77c2f476 Uses different port for Jetty during integration testing to avoid clash new 42e3da550 Merge pull request #577 from apache/WW-5192-radio The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: apps/showcase/pom.xml | 6 + .../java/org/apache/struts2/components/Radio.java | 4 + .../test/java/org/apache/struts2/TestAction.java | 77 +++-- .../apache/struts2/views/jsp/AbstractTagTest.java | 68 +++-- .../org/apache/struts2/views/jsp/ui/RadioTest.java | 311 ++--- .../org/apache/struts2/views/jsp/ui/Radio-10.txt | 4 + .../org/apache/struts2/views/jsp/ui/Radio-9.txt| 4 + 7 files changed, 312 insertions(+), 162 deletions(-) create mode 100644 core/src/test/resources/org/apache/struts2/views/jsp/ui/Radio-10.txt create mode 100644 core/src/test/resources/org/apache/struts2/views/jsp/ui/Radio-9.txt
[struts] 01/01: Merge pull request #577 from apache/WW-5192-radio
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit 42e3da550f92e391c20063debeeec943c1e6c5a5 Merge: f3cb89202 b77c2f476 Author: Lukasz Lenart AuthorDate: Mon Jul 11 10:27:06 2022 +0200 Merge pull request #577 from apache/WW-5192-radio [WW-5192] Fixes broken radio tag when using with enums apps/showcase/pom.xml | 6 + .../java/org/apache/struts2/components/Radio.java | 4 + .../test/java/org/apache/struts2/TestAction.java | 77 +++-- .../apache/struts2/views/jsp/AbstractTagTest.java | 68 +++-- .../org/apache/struts2/views/jsp/ui/RadioTest.java | 311 ++--- .../org/apache/struts2/views/jsp/ui/Radio-10.txt | 4 + .../org/apache/struts2/views/jsp/ui/Radio-9.txt| 4 + 7 files changed, 312 insertions(+), 162 deletions(-)
[struts] 01/01: WW-5204 Upgrades OGNL to version 3.3.3
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch WW-5204-ognl-3-3-3 in repository https://gitbox.apache.org/repos/asf/struts.git commit 82f7904206e4f7c3b94edf47fb8ed842941e2237 Author: Lukasz Lenart AuthorDate: Mon Jul 11 10:28:58 2022 +0200 WW-5204 Upgrades OGNL to version 3.3.3 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0419d114e..9e2148731 100644 --- a/pom.xml +++ b/pom.xml @@ -113,7 +113,7 @@ 2.13.2 2.13.2.1 2.18.0 -3.3.2 +3.3.3 1.7.32 5.3.20 3.0.8
[struts] branch WW-5204-ognl-3-3-3 created (now 82f790420)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch WW-5204-ognl-3-3-3 in repository https://gitbox.apache.org/repos/asf/struts.git at 82f790420 WW-5204 Upgrades OGNL to version 3.3.3 This branch includes the following new commits: new 82f790420 WW-5204 Upgrades OGNL to version 3.3.3 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference.
[struts] branch master updated (42e3da550 -> de3dabbe4)
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a change to branch master in repository https://gitbox.apache.org/repos/asf/struts.git from 42e3da550 Merge pull request #577 from apache/WW-5192-radio add 82f790420 WW-5204 Upgrades OGNL to version 3.3.3 new de3dabbe4 Merge pull request #579 from apache/WW-5204-ognl-3-3-3 The 1 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "add" were already present in the repository and have only been added to this reference. Summary of changes: pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[struts] 01/01: Merge pull request #579 from apache/WW-5204-ognl-3-3-3
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts.git commit de3dabbe443ae70c083f7313ba0bd74f0a3222e5 Merge: 42e3da550 82f790420 Author: Lukasz Lenart AuthorDate: Mon Jul 11 10:49:38 2022 +0200 Merge pull request #579 from apache/WW-5204-ognl-3-3-3 [WW-5204] Upgrades OGNL to version 3.3.3 pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
[struts-examples] branch master updated: Adds a simple JFreeChart example
This is an automated email from the ASF dual-hosted git repository. lukaszlenart pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/struts-examples.git The following commit(s) were added to refs/heads/master by this push: new d752915 Adds a simple JFreeChart example d752915 is described below commit d75291545aa40f5b013ec3b9b1694db9a37382e0 Author: Lukasz Lenart AuthorDate: Tue Jul 12 08:02:37 2022 +0200 Adds a simple JFreeChart example --- jfreechart/pom.xml | 90 ++ .../main/java/org/apache/struts/example/Chart.java | 65 jfreechart/src/main/resources/log4j2.xml | 37 + jfreechart/src/main/resources/struts.xml | 47 +++ jfreechart/src/main/webapp/WEB-INF/index.jsp | 32 jfreechart/src/main/webapp/WEB-INF/web.xml | 46 +++ jfreechart/src/main/webapp/index.html | 30 pom.xml| 1 + 8 files changed, 348 insertions(+) diff --git a/jfreechart/pom.xml b/jfreechart/pom.xml new file mode 100644 index 000..d4ffa85 --- /dev/null +++ b/jfreechart/pom.xml @@ -0,0 +1,90 @@ + + + +http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";> +4.0.0 + +struts-examples +org.apache.struts +1.1.0 + + +jfreechart +war +jfreechart + + +UTF-8 + + + + + +org.apache.struts +struts2-jfreechart-plugin +${struts2.version} + + + +org.jfree +jfreechart +1.5.1 + + + +javax.servlet +javax.servlet-api +3.1.0 +provided + + + +javax.servlet +jsp-api +2.0 +provided + + + + + + + +org.eclipse.jetty +jetty-maven-plugin +${jetty-plugin.version} + + +/${project.artifactId} + +CTRL+C +8999 +10 + + src/main/webapp/WEB-INF/web.xml + + + + + + diff --git a/jfreechart/src/main/java/org/apache/struts/example/Chart.java b/jfreechart/src/main/java/org/apache/struts/example/Chart.java new file mode 100644 index 000..7548c6f --- /dev/null +++ b/jfreechart/src/main/java/org/apache/struts/example/Chart.java @@ -0,0 +1,65 @@ +/* + * 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.struts.example; + +import com.opensymphony.xwork2.ActionSupport; +import org.apache.commons.lang3.RandomUtils; +import org.jfree.chart.JFreeChart; +import org.jfree.chart.axis.NumberAxis; +import org.jfree.chart.axis.ValueAxis; +import org.jfree.chart.plot.XYPlot; +import org.jfree.chart.renderer.xy.StandardXYItemRenderer; +import org.jfree.data.xy.XYSeries; +import org.jfree.data.xy.XYSeriesCollection; + +public class Chart extends ActionSupport { + +private JFreeChart chart; + +public String execute() throws Exception { +XYSeries dataSeries = new XYSeries(1); +for (int i = 0; i <= 100; i++) { +dataSeries.add(i, RandomUtils.nextInt()); +} +XYSeriesCollection xyDataset = new XYSeriesCollection(dataSeries); + +ValueAxis xAxis = new NumberAxis("Raw Marks"); +ValueAxis yAxis = new NumberAxis("Moderated Marks"); + +chart = new JFreeChart( +"Moderation Function", +JFreeChart.DEFAULT_TITLE_FONT, +new XYPlot( +xyDataset, +xAxis, +yAxis, +new StandardXYItemRenderer(StandardXYItemRenderer.LINES)), +false +)