Commit Graph

452 Commits

Author SHA1 Message Date
Lukasz Lenart c99526ce1f WW-5296 Uses proper DTDs 2023-05-16 20:22:03 +02:00
Lukasz Lenart 1a3af1907a WW-5289 Fixes creating executor to avoid locking JVM on shutdown 2023-03-26 14:11:10 +02:00
Stefaan Dutry 95a6dff1f5 WW-5251 remove deprecated interfaces related to ServletConfigInterceptor 2023-03-14 00:04:32 +01:00
Kusal Kithul-Godage 6ea67a6d64 WW-5270 Test for forwarding from Struts excluded URL to Struts Action 2023-01-30 21:54:16 +11:00
Lukasz Lenart d11cf771b6 WW-5264 Uses proper parent package when testing XSLT result 2022-12-13 07:43:10 +01:00
Kusal Kithul-Godage afd04ea5af WW-5199 Allow forwarding from/to actions 2022-12-09 00:26:40 +11:00
Lukasz Lenart 4bb81d5909 WW-5255 Fixes <s:script/> and <s:link/> and uses them across tags 2022-11-02 12:20:33 +01:00
Lukasz Lenart 26effbf05d WW-5241 Improves Exec&Wait example in Showcase app 2022-10-13 15:39:07 +02:00
Lukasz Lenart 8f0db1d22a WW-3691 Converts BackgroundProcess into interface and uses Executor to execute BackgroundProcess 2022-10-05 09:10:24 +02:00
Lukasz Lenart 3774ffa7c3 WW-5234 Improves DTD definitions to use proper URL 2022-09-27 09:21:03 +02:00
Lukasz Lenart cb59974903 WW-5190 Marks all Struts related filters with <async-supported/> 2022-06-27 09:44:51 +02:00
Lukasz Lenart ecfdee137d WW-5190 Disables test which won't pass without refactoring the prepare and execute filters 2022-06-27 09:37:17 +02:00
Lukasz Lenart 8c37b1523f WW-5190 Uses proper order of servlets and filters 2022-06-22 07:58:12 +02:00
Lukasz Lenart d639b59f6d Merge branch 'master' into WW-5190-match-action-proxy 2022-06-18 09:45:20 +02:00
Lukasz Lenart 8e468a368e WW-5190 Defines two examples with Dispatcher result and integration tests 2022-06-18 09:45:10 +02:00
Lukasz Lenart 957292ecdb Simplifies logging pattern in Showcase app 2022-06-18 07:27:32 +02:00
Lukasz Lenart 06290cef91 Fixes showing configuration of an action in Showcase app 2022-06-18 07:26:13 +02:00
Lukasz Lenart 9a2996f9b7 Uses proper Servlet API 3.1 headers 2022-06-10 16:06:27 +02:00
Lukasz Lenart 07b88fcc35 Upgrades integration tests config to match Spring and Jetty 2022-05-24 09:51:42 +02:00
Lukasz Lenart c094052969 Uses Java Reflections instead BeanUtils to read property 2022-03-04 12:52:33 +01:00
Lukasz Lenart 61e6d342ba WW-5022 Cleans up escapeHtmlBody flag with default value 2022-01-23 10:45:14 +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 8e6815e115 WW-4789 WW-3788 Stops using get() 2020-04-08 08:22:00 +02: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 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
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 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 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
Aleksandr Mashchenko 478945a0bd WW-4915 Replace deprecated commons-lang3 classes (add commons-text dependency, replace StringEscapeUtils) 2018-02-05 21:15:17 +02:00