Commit Graph

952 Commits

Author SHA1 Message Date
Lukasz Lenart c094052969 Uses Java Reflections instead BeanUtils to read property 2022-03-04 12:52:33 +01:00
Lukasz Lenart 115fef2af7 [maven-release-plugin] prepare for next development iteration 2022-02-24 07:11:22 +01:00
Lukasz Lenart 0c9f9c3400 [maven-release-plugin] prepare release STRUTS_6_0_0_RC3 2022-02-24 07:11:13 +01:00
Lukasz Lenart 14c3a14c8f [maven-release-plugin] prepare for next development iteration 2022-01-29 17:36:34 +01:00
Lukasz Lenart f997d9b1ed [maven-release-plugin] prepare release STRUTS_6_0_0_RC2 2022-01-29 17:36:26 +01:00
Lukasz Lenart 1e32510ea6 Merge pull request #523 from apache/WW-5022-escape-false
[WW-5022] Sets escapeHtmlBody to false by default and defines a new flag
2022-01-23 13:02:48 +01:00
Lukasz Lenart 61e6d342ba WW-5022 Cleans up escapeHtmlBody flag with default value 2022-01-23 10:45:14 +01:00
Yasser Zamani 60e1212bcc Merge pull request #522 from apache/WW-4792-constants-cleanup
[WW-4792] Uses proper names for constants
2022-01-06 19:20:54 +03:30
Lukasz Lenart 5c9299b9c4 WW-4792 Uses proper names for constants 2022-01-01 14:04:38 +01:00
JCgH4164838Gh792C124B5 583d399c24 Update:
- Fix REST Showcase JSP issue for s:link tags that replaced HTML link tags.
- s:link tags cannot use JSP EL in them.  Modified JSPs to use scriptlet,
JSP expression, and OGNL expression to work with s:link tag.
2021-12-27 21:23:35 -05:00
Lukasz Lenart 57f76d94f2 [maven-release-plugin] prepare for next development iteration 2021-12-19 12:50:38 +01:00
Lukasz Lenart 96aedf9bd5 [maven-release-plugin] prepare release STRUTS_6_0_0_RC1 2021-12-19 12:50:28 +01:00
Lukasz Lenart e40afbc971 WW-5123 Makes labelpostion deprecated 2021-06-27 09:22:48 +02:00
Yasser Zamani 04bc4bd97c [WW-5125] use .get(...) instead of [...] for fieldErrors
All [ occurrences in all ftl files reviewed. Only fieldErrors had used [...] which replaced by .get(...) to fix WW-5125 as well as aligning with other ftl files conduct.
2021-05-02 20:47:51 +04:30
Lukasz Lenart ef72783f50 WW-5021 Introduces a new constant to allow define a path to static content 2021-01-02 17:52:29 +01:00
Lukasz Lenart 9bdb578540 Uses proper exclude pattern to avoid processing JS, CSS and images 2020-12-03 09:41:05 +01:00
Lukasz Lenart a7c4ef827d Excludes non-Struts related requests 2020-12-03 09:05:23 +01:00
Pierre-Yves Soblet 08fb2d71ad WW-5088: Add licence to FileUploadTest. 2020-10-14 13:10:02 +02:00
Pierre-Yves Soblet a16dbb0b38 WW-5088: Integration test for empty file upload. 2020-10-14 10:45:19 +02:00
Yasser Zamani f70999c401 fix tags 2020-09-11 01:04:06 +04:30
Ecenaz Ozmen 62424ef30c Refactoring script and link elements for CSP nonce propagation 2020-08-31 11:39:57 +03:00
Lukasz Lenart 0129d30abf Merge pull request #397 from apache/action-context-boost
[WW-4789] [WW-3788] ActionContext refactoring
2020-05-04 07:06:32 +02:00
Lukasz Lenart 6afcbf2861 Merge pull request #411 from JCgH4164838Gh792C124B5/WW-5072_fix
Minor change to fix WW-5072

(cherry picked from commit e46e662a7a)
2020-05-03 12:11:45 -04:00
Lukasz Lenart f071c9d0ed Reverse merges master 2020-04-21 20:42:15 +02:00
JCgH4164838Gh792C124B5 9d0a6a80ad Proposed WW-5068 change.
------
Proposed list of library version updates:
---
    cdi-api 1.0-SP4 -> 1.2
    weld-core 1.0.1-SP4 -> 2.2.16.SP1
    weld-se 1.0.1-Final -> weld-se-core 2.2.16.SP1
    htmlunit 2.27.0 and 2.37.0 -> 2.39.0
    slf4j-api 1.7.29 -> 1.7.30
    slf4j-simple 1.7.29 -> 1.7.30
    log4j2 2.12.1 - > 2.13.1
    jackson 2.10.1 -> 2.10.3
    ognl 3.2.12 -> 3.2.14
    asm 7.2 -> 7.3.1
    spring 4.3.25.RELEASE -> 4.3.26.RELEASE
    fluido-skin 1.8 -> 1.9
    freemarker 2.3.28 -> 2.3.30
    org.apache.felix.main 4.6.1 -> 6.0.3
    velocity 2.1 -> 2.2
    junit 4.12 -> 4.13
    easymock 3.5.1 -> 4.2
    javax.el 3.0.1-b10 -> 3.0.1-b11
    jstl 1.1.2 -> 1.2
    tomcat-jasper 8.5.37 -> 8.5.53
    tomcat-api 8.5.37 -> 8.5.53
    tomcat-juli 8.5.37 -> 8.5.53
    commons-lang3 3.9 -> 3.10
    assertj-core 2.9.1 -> 3.15.0
    mockito-core 2.23.0 -> 3.3.3   (required exclusion for objenesis)
    testng 5.14.10 -> 7.1.0
    juneau-marshall 7.2.2 -> 8.1.3
    validation-api 1.1.0.Final -> 2.0.1.Final
    hibernate-validator 5.4.3.Final -> 6.1.2.Final
    jaxb-impl 2.3.1 -> 2.3.2
---
Proposed list of Maven plugin version updates:
---
    maven-project-info-reports-plugin 2.7 -> 3.0.0
    updateimpact-maven-plugin 1.0.10 -> 1.0.12
    maven-surefire-plugin 2.22.2 -> 3.0.0-M4
    jacoco-maven-plugin 0.8.4 - > 0.8.5
    maven-war-plugin 3.2.2 -> 3.2.3
    maven-bundle-plugin 3.5.0 -> 4.2.1
    maven-dependency-plugin 3.1.1 -> 3.1.2
    dependency-check-maven 5.2.4 -> 5.3.2
    maven-enforcer-plugin 3.0.0-M2 -> 3.0.0-M3
    maven-failsafe-plugin 2.22.2 -> 3.0.0-M4
    maven-site-plugin 3.8.2 -> 3.9.0
    doxia-core 1.9 -> 1.9.1
    doxia-module-markdown 1.9 -> 1.9.1
---
2020-04-18 18:40:21 -04:00
Lukasz Lenart 8e6815e115 WW-4789 WW-3788 Stops using get() 2020-04-08 08:22:00 +02:00
Lukasz Lenart 9053c84d50 Merge pull request #394 from apache/WW-5047-new-velocity
[WW-5047] Upgrades to VelocityEngine 2.1 and VelocityTools 3.0
2020-02-24 09:36:11 +01:00
JCgH4164838Gh792C124B5 ecba2406d5 WW-5057 Showcase cleanup for 2.6 branch:
- Added missing elements to the UI Velocity example (for consistency with
  JSP example).
- Fix some spelling typos in labels/tooltips (both JSP and Velocity UI
  examples).
- Fixed some html/css issues with results pages for JSP and Velocity UI
  examples (consistency).
- Made JSP UI example s:form use POST method to avoid warning in console
  when opening page.
- Enhanced ViewSourceAction to allow View Sources "configuration" tab to
  work when running Showcase as an "exploded" WARfile.
- Added escapeHtmlBody="false" to multiple tags in .ftl Showcase files
  (fix broken display elements - submit and anchor mostly).
- Added missing favouriteCities getter/setter to MoreSelectsAction action.
- Upgrade htmlunit from 2.27 to 2.37.0
- Upgrade maven failsafe plugin from 2.22.1 to 2.22.2
2020-02-01 17:39:54 -05:00
Lukasz Lenart 71d4a7be3b WW-5047 Upgrades to VelocityEngine 2.1 and VelocityTools 3.0 2020-02-01 12:49:01 +01:00
Lukasz Lenart 5c55e69b4f WW-5049 Moves Velocity support into a dedicated plugin 2019-12-29 09:07:00 +01:00
Lukasz Lenart 03da857d9f Fixes Showcase app Tiles example 2019-12-17 20:31:28 +01:00
Lukasz Lenart 6504e674b0 Adds a link to Struts Examples pages 2019-11-25 09:37:40 +01:00
JCgH4164838Gh792C124B5 9592355960 Proposed fix for WW-5022 (escape html tag body control flag)
- Added escapeHtmlBody parameter to s:a and s:submit tags.
- No other tags appear to require this feature (but can be added to any
component).
- Added new unit tests for escapeHtmlBody (and usesBody for component).
- Fixed broken s:a tags in ShowCase app.
2019-10-14 17:52:16 -04:00
JCgH4164838Gh792C124B5 d3eb1fc595 Fix for default (un-configured) allowStaticFieldAccess state, Showcase Application in 2.6.x (#334)
* Fix for default un-configured allowStaticFieldAccess state:
1) Ensure OgnlValueStackFactory returns true for allowStaticFieldAccess when not configured (consistency - same as OgnlUtil does).
2) Add test to OgnlValueStackTest for the no allowStaticXXX flags present.

Minor config fixes for the Showcase Application in 2.6.x:
1) File upload examples.  Multiple file upload missing result page (list and array), added missing JSP.  Added missing input results in configuration.
2) File upload examples.  Fixed NPE for multiple file upload (array version) when no files selected.
3) Add manual test for public constant access via expression (to If tag JSP).

* Added missed logic elements from PR#320 (identified by Y. Zamani):
1) Added ognlAllowStaticFieldAccess field and getter/setter to ConstantConfig.
2) Added allowStaticFieldAccess (set to true) to default.properties.

* Follow-up commit:
- Fixed wrong package reference in testNullMethod(), as well as in new tets.
- Added additional tests to cover the full set of static access flag combinations.

* Follow-up commit:
- Fixed createValueStack() not setting allowStaticFieldAccess parameter.
- Removed 3 unused import statement.
- Refactored OgnlValueStackFactory creation logic into two utility methods: getValueStackFactory(), reloadValueStackFactory()
- Added one additional test with a raw OgnlValueStackFactory generated OgnlValueStack (staticMethodAccess false, staticFieldAccess true).
  Test confirms same result as with a default OgnlValueStackFactory.
2019-03-11 09:35:48 +03:30
JCgH4164838Gh792C124B5 a2ba5a0e62 Fix 2.6 Showcase bean-validator Java 11 failures.
The 2.6 Showcase application is throwing JAXB-classloading-related failures when deployed to a container running Java 11.
The stacktrace indicates the issues relate to the bean-validator and Hibernate-Validator (but no issues with Java 8).
Proposed fix:
1) Upgrade Showcase from 5.1.3.Final to 5.4.3.Final (most recent available).
2) Upgrade bean-validator from 5.4.1-Final to 5.4.3.Final (to match versions).
2019-02-14 01:03:44 -05:00
Johannes Geppert bbe46e92f0 Fix compile issue of post order test example with latest http client version 2019-02-09 15:32:02 +01:00
Johannes Geppert 75d252554b Solve some dependency convergence issues reported by maven enforce plugin
https://issues.apache.org/jira/browse/WW-5018
2019-02-09 15:04:22 +01:00
Aleksandr Mashchenko 094b6c5e3b Merge pull request #289 from lukaszlenart/WW-4972
[WW-4972] Switches incompatible_improvements to VERSION_2_3_28
2019-01-06 22:16:27 +02:00
Yasser Zamani 46e14a80cc downgrade htmlunit to 2.24 to keep java 7 compatibility
References:
http://htmlunit.sourceforge.net/changes-report.html#a2.25
2019-01-02 16:24:01 +03:30
Yasser Zamani fa90e01ba5 introduce integration tests with minimum needed changes (#301)
* introduce integration tests with minimum needed changes

* report coverage for integration tests as well

References:
https://stackoverflow.com/a/41364462
http://www.mojohaus.org/cobertura-maven-plugin/usage.html#reports

* switch to JaCoCo as test coverage library

Cobertura latest release is old, 2015, has issues with java and an old weird issue with integration tests [1].

[1] https://github.com/cobertura/cobertura/issues/230

* Use HtmlUnit instead of JWebUnit
2018-12-31 19:21:49 +03:30
Lukasz Lenart 3d20e80950 WW-4972 Uses built-in auto escaping instead of escaping each parameter 2018-12-23 17:44:12 +01:00
Yasser Zamani 7dcdfbe1d7 upgrade to DWR 3 with a showcase
See also WW-4069
2018-12-03 16:23:55 +03:30
JCgH4164838Gh792C124B5 0e410639f3 Upgrade DWR from 1.x to 2.x
- intended to resolve Jenkins build failure with old DWR version.

pom.xml changes:
- entry change in struts2-parent pom.xml
  - upgrade 1.1.1 (uk.ltd.getahead) -> 2.0.11-RELEASE (org.directwebremoting)
- entry change in struts2-dwr-plugin pom.xml
- entry change in struts2-showcase pom.xml
2018-11-25 22:32:22 -05:00
JCgH4164838Gh792C124B5 53d7d04246 Update Struts 2.6.0 build with some newer (compatible) library versions.
- Add missing multiple-success.jsp for Showcase application.
- Enhance main pom.xml maven-surefire-plugin configuration to avoid some test-ng related duplication failures:  "Cannot find JUnit method class junit.framework.TestSuite$1.warning".
- Remove unnecessary plugins/embeddedjsp/pom.xml (struts2-embeddedjsp-plugin) maven-surefire-plugin version override (noted with preceding change).
- Update Struts 2.6.0 build to use some newer (compatible) library versions.
  Change the main pom.xml library versions for the following:
  - spring.platformVersion 4.3.13.RELEASE -> 4.3.20.RELEASE
  - oval 1.31 -> 1.90  (Note: required unit test fix for OValValidationInterceptorTest.java AND code fix for OvalValidationInterceptor.java)
                       (Additional Note: 1.70 was the most recent that functioned without a fix to OvalValidationInterceptor)
  - jackson 2.9.6 -> 2.9.7
  - fluido-skin.version 1.6 -> 1.7
  - slf4j (slf4j-api, slf4j-simple) 1.7.12 -> 1.7.25
  - xstream 1.4.10 -> 1.4.11.1
  - jetty 6.1.9 -> 6.1.26 (last in 6.1.x line)
  - xerces 2.10.0 - > 2.12.0
  - org.owasp 3.1.1 -> 3.3.4
  - versions-maven-plugin 2.5 -> 2.7
  - doxia-core 1.7 -> 1.8
  - doxia-module-markdown 1.3 -> 1.7
  - org.apache.felix.main 4.0.3 -> 4.6.1  (Note: most recent 4.x)
  - easymock 3.4 -> 3.5.1
  - javax.el 3.0 -> 3.0.1-b10
  - jasper 6.0.18 -> 6.0.53  (Note: most recent 6.0.x)
  - juli 6.0.18 -> 6.0.53    (Note: most recent 6.0.x)
  - commons-logging 1.1.3 -> 1.2
  - commons-collections4 4.1 -> 4.2
  - commons-io 2.5 -> 2.6
  - commons-lang3 3.6 -> 3.8.1
  - commons-text 1.2 -> 1.3  (Note: most recent compatible with Java 7)
  - commons-validator 1.5.1 -> 1.6
  - mockito 1.9.5 -> 1.10.19            (Note: most recent 1.x)
  - cdi-api 1.0-SP1 -> 1.0-SP4          (Note: most recent 1.0.x)
  - weld-core 1.0.1-Final -> 1.0.1-SP4  (Note: most recent 1.0.x)
  - cglib 2.2 -> 2.2.2                  (Note: most recent 2.2.x)
  Note for cglib-nodep:  Build succeeded with cglib-nodep 2.2.2 and 3.2.5.  Although
    cglib 3.2.5 matches ASM 5.2, jmock-cglib 1.2.0 identifies cglib-nodep 2.1_3 as its
    requirement (on the JMock http://jmock.org/download.html download page) so it should
    probably remain as long as JMock 1.2.0 is used.
2018-11-12 19:58:15 -05:00
Yasser Zamani 6f56e14de9 Merge pull request #252 from lukaszlenart/with-no-setters
WW-4963 Implement new Aware interfaces
2018-10-22 12:42:48 +03:30
JCgH4164838Gh792C124B5 50d57e118e Minor config fixes for the Showcase Application:
1) Token examples. Examples 2 and 3 previously resulted in 403's upon submit (config issue).
2) Token examples. Example 4 resulted in error 500 when selected from the menu (FTL param type issue).
3) Validation examples.  Examples quizBasic, quizClient and quizClientCss resulted in 404's when selected from menu (config issue).
2018-10-08 18:53:30 -04:00
Lukasz Lenart b608549933 WW-4963 Implements new ServletContextAware interface and fixes actions
that uses withServletContext instead of setServletContext
2018-09-25 10:02:58 +02:00
Lukasz Lenart 1f5d29ac68 Uses proper headers in web.xml 2018-03-20 15:42:07 +01:00
Lukasz Lenart c41a0167dd Merge pull request #179 from yasserzamani/WW-4874
WW-4874 Introduces Async plugin (adds support for async methods)
2018-03-20 14:59:12 +01:00
Lukasz Lenart 7f3c09c98e Merge pull request #208 from aleksandr-m/feature/lang_to_text
WW-4915 Replace deprecated commons-lang3 classes
2018-03-16 14:30:40 +01:00