Commit Graph

1145 Commits

Author SHA1 Message Date
Lukasz Lenart 2794832317 [maven-release-plugin] prepare for next development iteration 2026-08-01 15:24:56 +02:00
Lukasz Lenart a88fd76364 [maven-release-plugin] prepare release STRUTS_7_3_0 2026-08-01 14:57:50 +02:00
Lukasz Lenart 464817e0b0 WW-5653 Upgrade Bootstrap to 5.3.x in sample apps (#1793)
* WW-5653 docs: add Bootstrap 5.3.x sample-app migration design

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 docs: add Bootstrap 5 migration implementation plan

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 build: add Bootstrap 5, Bootstrap Icons, showcase jQuery webjars

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 feat(showcase): serve Bootstrap 5 and jQuery via webjars

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 fix(showcase): serve html5 demo Bootstrap CSS via webjar

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 feat(showcase): migrate navbar and top-level pages to Bootstrap 5

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 fix(showcase): migrate leftover Bootstrap 2 icon and fixed-navbar classes

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 feat(showcase): migrate tag-demo pages to Bootstrap 5

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 feat(showcase): migrate validation-demo pages to Bootstrap 5

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 feat(showcase): migrate fileupload and conversion pages to Bootstrap 5

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 feat(showcase): migrate wait, token and empmanager pages to Bootstrap 5

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 fix(showcase): remove BS3 carets and well class

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 fix(showcase): use ms-auto for right nav and add nav-link to Home

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 feat(rest-showcase): serve Bootstrap 5 CSS via webjars

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 feat(rest-showcase): migrate JSP markup to Bootstrap 5

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 fix(rest-showcase): migrate legacy BS2/BS3 grid classes to Bootstrap 5

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 fix(showcase): drop obsolete css/js excludePattern so webjar JS is served

The old struts.action.excludePattern whitelisted the vendored /styles/*.css
and /js/*.js layout for container serving. After moving Bootstrap/jQuery to
webjars under /static/webjars/**, the '.*/js/.*\.js' entry matched the webjar
JS path (e.g. bootstrap.bundle.min.js) and excluded it from Struts' static
handler, so it fell through to the container and 404'd. Remaining webapp assets
(prettify.js, main.css) are served via default-servlet fall-through.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 fix(samples): migrate remaining BS2/BS3 classes (tables, buttons, progress, forms, navbar)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 chore(showcase): comment out verbose debug loggers

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 fix(showcase): migrate Bootstrap 5 markup in ftl/vm/html templates

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 test(showcase): disable JS in FreeMarkerManagerTest for Bootstrap 5

HtmlUnit's JS engine cannot parse Bootstrap 5's ES6 (bootstrap.bundle.min.js
uses 'class'), and the decorator now serves it, so the default WebClient threw
on script error. The test only asserts server-rendered FreeMarker output, so
JavaScript is disabled (matching Html5TagExampleTest).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 fix(showcase): replace dead Bootstrap 2 form and alert classes

Migrate new-person.ftl form off BS2 control-group/controls/form-actions to
Bootstrap 5 (mb-3, form-label, form-control), and replace the dead alert-error
class with alert-danger across the showcase pages.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 test(showcase): make integration tests tolerate Bootstrap 5 under HtmlUnit

HtmlUnit 5.2.0 cannot parse Bootstrap 5's minified ES6 (bootstrap.bundle.min.js
uses 'class'), which broke the showcase HtmlUnit integration tests once the
decorator started serving the bundle.

- Add ParameterUtils.createWebClient() which disables throwExceptionOnScriptError,
  and route all integration tests through it (they assert server-rendered output,
  not Bootstrap's client-side behaviour).
- Load bootstrap.bundle.min.js with 'defer' so a page's own inline scripts (e.g.
  the async chat demo) still execute before HtmlUnit hits the bundle's parse
  error; defer is also the recommended real-browser loading strategy.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 test(showcase): poll for async chat result instead of fixed sleep

AsyncTest relied on a fixed Thread.sleep(4000) for the server-push chat
round-trip, which is not enough on slower/newer JVMs (reproduced failing on
JDK 25). Poll the result element for up to ~30s via waitForBackgroundJavaScript
instead, making the test robust across JVMs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 test(showcase): drive AsyncTest via HTTP instead of HtmlUnit

The browser-driven chat test was flaky on JDK 25 in CI: HtmlUnit's handling of
the async server-push long-poll timed out (message never rendered), even with
polling. The test's purpose is to validate the Servlet 3 async endpoints, which
needs no browser or JavaScript. Rewrite it to POST /async/sendMessage and read
/async/receiveNewMessages directly over HTTP and assert the JSON, making it
deterministic and independent of Bootstrap/HtmlUnit JS parsing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 fix(showcase): drop progressbar role from wait progress bar

Resolves a SonarCloud accessibility finding (S6819) introduced by the Bootstrap 5
migration. The BS5 progress component is styled on .progress/.progress-bar divs;
the role/aria attributes were newly added (the BS3 original had none), so removing
them clears the finding while keeping the Bootstrap 5 styling.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 fix(showcase): correct BS5 alert wrapper and drop stray table tag

Address Copilot review on PR #1793:

- decorators/main.jsp: the dismissible wrapper was a second .alert with no
  variant while the variant class (alert-danger, etc.) stayed on the inner
  <ul>, producing a nested, uncoloured alert box. Move the alert* classes
  onto the wrapper and strip them from the <ul> so the wrapper is the single
  alert container.
- orders-edit.jsp: remove the stray, unclosed <table> start tag before
  </s:form> (pre-existing invalid markup carried over during the migration).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 fix(showcase): remove BS3 navbar-header wrapper and orphan dropdown-submenu

Clean up two leftover Bootstrap 3 artifacts in the showcase decorator navbar:

- Drop the `navbar-header` wrapper (no BS5 CSS behind it) and make the brand
  and toggler direct children of the `.container-fluid` flex container
  (justify-content: space-between), with the brand first per BS5 convention.
- Remove the empty, unclosed `<li class="dropdown-submenu">` orphan before the
  first item in the Examples menu; BS5 has no dropdown-submenu feature.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 fix(showcase): replace soft-deprecated navbar-light with data-bs-theme

navbar-light is soft-deprecated in Bootstrap 5.3. Switch the showcase navbar
to the current data-bs-theme="light" idiom; bg-light is retained for the
background.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 fix(showcase): normalize page-header replacement to border-bottom utilities

A handful of showcase pages replaced the BS3 page-header with a bare <div>
while the rest used <div class="border-bottom pb-2 mb-3">. Normalize those 35
header wrappers to the same border-bottom pb-2 mb-3 utilities so all showcase
page headers render consistently.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

* WW-5653 fix(rest-showcase): add mb-3 to page-header replacement

Align rest-showcase order page headers with the showcase standard by using
border-bottom pb-2 mb-3 (was border-bottom pb-2), so header spacing is
consistent across both sample apps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-20 18:16:03 +02:00
Lukasz Lenart 50c16e93b1 Release 7.2.1-RC1 (#1744)
* [maven-release-plugin] prepare release STRUTS_7_2_1

* [maven-release-plugin] prepare for next development iteration
2026-06-26 07:18:26 +02:00
dependabot[bot] 22243e75f5 build(deps): bump org.sitemesh:sitemesh from 3.2.2 to 3.2.3 (#1749)
Bumps [org.sitemesh:sitemesh](https://github.com/sitemesh/sitemesh3) from 3.2.2 to 3.2.3.
- [Release notes](https://github.com/sitemesh/sitemesh3/releases)
- [Commits](https://github.com/sitemesh/sitemesh3/compare/3.2.2...3.2.3)

---
updated-dependencies:
- dependency-name: org.sitemesh:sitemesh
  dependency-version: 3.2.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-26 07:17:04 +02:00
Lukasz Lenart 489445c78d Release 7.2.0-RC1 (#1742)
* [maven-release-plugin] prepare release STRUTS_7_2_0

* [maven-release-plugin] prepare for next development iteration
2026-06-15 12:07:02 +02:00
dependabot[bot] 7c6034c667 build(deps-dev): bump org.apache.maven.plugins:maven-failsafe-plugin (#1732)
Bumps [org.apache.maven.plugins:maven-failsafe-plugin](https://github.com/apache/maven-surefire) from 3.5.5 to 3.5.6.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.5...surefire-3.5.6)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-failsafe-plugin
  dependency-version: 3.5.6
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-06-10 13:23:50 +02:00
Lukasz Lenart 2215b6873c WW-5537 Resolve classloader/memory leaks during Tomcat hot deployment (#1632)
* WW-5537 Add InternalDestroyable and ContextAwareDestroyable interfaces

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 ContainerHolder: ThreadLocal with AtomicLong generation counter

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 FinalizableReferenceQueue: volatile instance, join, classloader null

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 ScopeInterceptor.clearLocks: add synchronized block

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 CompoundRootAccessor, DefaultFileManager: implement InternalDestroyable

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 Add InternalDestroyable adapter classes for static cache cleanup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 Register InternalDestroyable beans in struts-beans.xml

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 JSON plugin: add JSONCacheDestroyable for BeanInfo cache cleanup

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 Dispatcher.cleanup: refactor into focused methods with InternalDestroyable discovery

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 Rewrite DispatcherCleanupTest for InternalDestroyable discovery

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 Add log4j-web for proper Log4j2 lifecycle in Servlet container

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 Dispatcher.destroyObjectFactory: add early return on null, use pattern matching

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 Fix @since annotations: 7.1.0 -> 7.2.0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 Add Container.destroy() to clear internal caches on undeploy

Container now exposes a destroy() method that clears factories, injectors,
constructors, and ThreadLocals. This releases Class<?> keys and JDK
DelegatingClassLoader instances that pin the webapp classloader.

DefaultConfiguration.destroy() calls container.destroy() and
reloadContainer() delegates to destroy() to avoid duplication.

Also fixes JSONCacheDestroyable referencing non-existent DefaultJSONWriter
(renamed to StrutsJSONWriter).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 Fix Container.destroy(): don't clear factories, don't call from reloadContainer

factories must remain intact because existing code holds direct
references to the Container after destroyConfiguration() and expects
it to still resolve dependencies (e.g. during configuration reload).

reloadContainer() reverted to clearing packageContexts/loadedFileNames
directly — calling destroy() there nulled the container reference and
cleared state needed during the bootstrap transition.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 Restore destroy() call in reloadContainer()

The test failures were caused by factories.clear() in
Container.destroy(), not by calling destroy() from reloadContainer().
Now that factories.clear() is removed, destroy() is safe to call
here — it clears packageContexts, loadedFileNames, and the container's
reflection caches in one place.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* WW-5537 Fix Sonar issues: thread-safe FinalizableReferenceQueue, empty method comments

- Replace volatile field with AtomicReference in FinalizableReferenceQueue
  for proper thread safety using getAndSet()
- Add comments to empty destroy() implementations in test mocks
- Replace deprecated new URL() with URI.toURL() in DispatcherCleanupTest
- Add comments to empty listener methods in DispatcherCleanupTest

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-29 07:17:57 +02:00
Lukasz Lenart 572f3aaf69 chore: harden showcase apps and convert READMEs to Markdown (#1624)
- Add production deployment warnings to showcase and rest-showcase READMEs
- Convert README.txt to README.md with proper Markdown formatting
- Restrict ViewSourceAction config parameter to XML files within webapp path

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 10:25:04 +01:00
dependabot[bot] 3fc9efce5a build(deps-dev): bump org.apache.maven.plugins:maven-failsafe-plugin (#1595)
Bumps [org.apache.maven.plugins:maven-failsafe-plugin](https://github.com/apache/maven-surefire) from 3.5.4 to 3.5.5.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.4...surefire-3.5.5)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-failsafe-plugin
  dependency-version: 3.5.5
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-25 08:59:24 +01:00
Lukasz Lenart ca740ed8fb WW-5514 Add StrutsProxyService for proxy detection and resolution (#1586)
* feat(proxy): WW-5514 add StrutsProxyService for proxy detection and resolution

Introduces a configurable ProxyService interface and StrutsProxyService
implementation for detecting and resolving Spring AOP/Hibernate proxies.

Key changes:
- Add ProxyService interface with isProxy, ultimateTargetClass, and
  resolveTargetMember methods
- Add StrutsProxyService implementation using configurable caches
- Add ProxyCacheFactory and StrutsProxyCacheFactory for cache management
- Integrate ProxyService into ChainingInterceptor, ParametersInterceptor,
  and SecurityMemberAccess
- Add integration test with Spring AOP proxied action chaining
- Add configuration constants for proxy cache type and size

The StrutsProxyService correctly handles:
- Spring CGLIB proxies (class-based)
- Spring JDK dynamic proxies (interface-based)
- Hibernate entity proxies
- Member resolution for allowlist checking

Fixes WW-5514

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* test(proxy): WW-5514 add ProxyService integration tests for Spring proxies

Add integration tests to SpringProxyUtilTest that verify the new
ProxyService works correctly with real Spring AOP proxies, alongside
the existing deprecated ProxyUtil tests.

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(proxy): WW-5514 address PR review feedback for proxy caches

Remove targetClassCache from StrutsProxyService to avoid memory leak
(object-keyed cache reintroduced from PR #1578). Change default proxy
cache type to wtlfu to align with all other caches. Switch deprecated
ProxyUtil static caches to BASIC to remove hard Caffeine dependency.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-21 18:18:08 +01:00
Lukasz Lenart 22b0fa9f12 chore: updates SNAPSHOT version to reflect current scope of changes (#1563) 2026-02-01 12:26:48 +00:00
Lukasz Lenart e24d2f2d3e WW-5444 Add HTML5 theme with comprehensive unit tests (#1422)
* WW-5444 Defines new html5 theme

* feat(themes): move html5 theme from showcase to core

- Move 42 FreeMarker templates to core/src/main/resources/template/html5/
- Remove duplicate templates from showcase
- Makes html5 theme available to all applications via struts2-core.jar
- Enables unit testing in core module
- Fix Html5Action import from XWork2 to Struts2 package
- Add Apache license header to Html5Action

Resolves WW-5444

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: add implementation plan for html5 theme migration

Add detailed implementation plan documenting the migration of html5 theme
from showcase to core, including step-by-step instructions, verification
procedures, and acceptance criteria.

Related to WW-5444

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* test(html5-theme): add comprehensive unit tests and fix template variables

- Add testGenericHtml5() methods to 13 UI tag test classes
- Create theme.properties with parent=simple configuration
- Migrate all 32 HTML5 templates from deprecated 'parameters' to 'attributes' variable
- Exclude DoubleSelect and UpDownSelect (not supported in HTML5 theme)
- All 26 HTML5 theme tests passing (100% success rate)

Components tested: Textfield, Textarea, Password, Checkbox, CheckboxList,
Radio, Select, File, Hidden, Label, ComboBox, Reset, Submit

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: update CLAUDE.md and remove jakarta-migration-helper agent

- Update CLAUDE.md with current project guidelines
- Update test-runner agent documentation
- Remove deprecated jakarta-migration-helper agent

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Adds missing header

* test(html5-theme): complete unit test coverage for remaining 5 tag classes

Add HTML5 theme tests to ActionErrorTagTest, ActionMessageTagTest,
FieldErrorTagTest, AnchorTest, and FormTagTest. This completes Phase 1
of the HTML5 theme testing plan.

Changes:
- Add 24 new HTML5 theme unit tests across 5 test classes
- Create 17 expected output files for HTML5 theme validation
- Test coverage: action errors, action messages, field errors, anchors, and forms
- All tests verify HTML5 clean markup without table-based layouts

Coverage: 18 of 18 UI tag test classes now have HTML5 tests (100%)
Tests passing: 24/24 HTML5 tests successful

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* test(html5-theme): add integration tests for showcase application

- Create Html5TagExampleTest with 5 comprehensive integration tests
- Add fielderror tag demonstration to html5/index.jsp
- Validate HTML5 theme rendering, error display, and clean markup
- All tests passing (5/5) with HtmlUnit and Jetty integration

Tests validate:
- Page load and HTTP status (200)
- Action errors, messages, and field errors display
- Clean semantic markup (ul lists, no table layouts)
- Anchor tag rendering
- Namespace isolation under /html5

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feat(html5-theme): WW-5444 replace FreeMarker compress with Struts compress tag

- Create CompressModel.java to enable <@s.compress> in FreeMarker templates
- Register compress tag in StrutsModels.java for @s namespace access
- Migrate all 29 HTML5 theme templates from <#compress> to <@s.compress>
- Maintain identical compression behavior (uses same >\\s+< regex pattern)
- All 153 HTML5 theme unit tests pass without modification

This change leverages the new configurable Compress component (WW-5256)
which provides devMode awareness and security protections while maintaining
the same whitespace removal behavior as FreeMarker's built-in directive.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

* feat(html5-theme): WW-5444 simplifies tags templates and extends example

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-14 19:24:05 +01:00
Lukasz Lenart 6131c9364e Fixes site and JavaDocs generation (#1419) 2025-11-22 16:55:18 +01:00
Lukasz Lenart 939576c1c3 WW-5585: Implement dynamic parameter evaluation for file upload validation (#1413)
* feat(fileupload): implement dynamic parameter evaluation for file upload validation

- Add WithLazyParams interface to ActionFileUploadInterceptor
- Enable runtime evaluation of ${...} expressions for validation rules
- Add comprehensive JavaDoc with static and dynamic examples
- Add 7 new unit tests for dynamic parameter scenarios
- Create DynamicFileUploadAction showcase with document/image modes
- All 23 tests pass successfully

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(fileupload): address Sonar quality issues in dynamic upload feature

- Mark uploadConfig field as transient for serialization compliance
- Add @Override annotation to input() method
- Add DOCTYPE html declarations to JSP files
- Add lang="en" attributes to html elements for accessibility
- Fix minor code formatting issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* test(fileupload): add integration tests for dynamic file upload

- Add DynamicFileUploadTest with 7 comprehensive test cases
- Test valid document and image uploads
- Test file type validation (documents reject images, images reject documents)
- Test size limit validation (5MB for documents, 2MB for images)
- Test switching between upload modes
- Add helper methods for creating test files of various sizes
- Follow existing FileUploadTest patterns using HtmlUnit

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(fileupload): use Preparable to initialize upload config before interceptors

Read uploadType directly from request in prepareUpload() method to ensure
upload validation config is set before WithLazyParams interceptor evaluates
the OGNL expressions. This fixes dynamic file type validation not working.

Also fixes:
- Test file creation using correct File.createTempFile prefix pattern
- Default port changed to 8090 in test utils
- Increased struts.multipart.maxSize for testing
- maximumSize parameter changed to String to support OGNL expressions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor(fileupload): simplify maximumSize type from String to Long

- Change maximumSize field type from String to Long for type safety
- Remove NumberUtils dependency and parsing logic
- Remove unused isNonEmpty() method
- Modernize instanceof patterns using Java 16+ pattern matching
- Fix error message key for null content validation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs(research): add lazy multipart parsing research for WW-5585

Documents investigation into dynamic file upload limits at parsing time.
Conclusion: current approach with global hard limits + WithLazyParams
interceptor validation is sufficient.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-11-22 15:34:45 +01:00
dependabot[bot] 69f2392808 Bump org.codehaus.groovy:groovy-jsr223 from 3.0.22 to 3.0.25 (#1398)
Bumps [org.codehaus.groovy:groovy-jsr223](https://github.com/apache/groovy) from 3.0.22 to 3.0.25.
- [Commits](https://github.com/apache/groovy/commits)

---
updated-dependencies:
- dependency-name: org.codehaus.groovy:groovy-jsr223
  dependency-version: 3.0.25
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-10-27 06:43:39 +01:00
Lukasz Lenart eba05e53da Reverse merge changes related to releasing Struts 7.1.1 (#1378)
* [maven-release-plugin] prepare release STRUTS_7_1_1

* [maven-release-plugin] rollback the release of STRUTS_7_1_1

* [maven-release-plugin] prepare release STRUTS_7_1_1

* [maven-release-plugin] prepare for next development iteration
2025-10-19 19:12:31 +02:00
Lukasz Lenart 44598f13e0 Merge pull request #1364 from apache/release/7.1.0
Reverse merge changes from release/7.1.0
2025-09-29 07:33:23 +02:00
Lukasz Lenart 4e308e2be0 [maven-release-plugin] prepare for next development iteration 2025-09-24 09:45:02 +02:00
Lukasz Lenart 02858b7ed5 [maven-release-plugin] prepare release STRUTS_7_1_0 2025-09-24 09:44:54 +02:00
Lukasz Lenart 8fcab78c5d [maven-release-plugin] rollback the release of STRUTS_7_1_0 2025-09-24 09:39:45 +02:00
Lukasz Lenart d50cfba32e [maven-release-plugin] prepare release STRUTS_7_1_0 2025-09-24 09:39:08 +02:00
dependabot[bot] e334753fa0 Bump org.apache.maven.plugins:maven-failsafe-plugin from 3.5.3 to 3.5.4
Bumps [org.apache.maven.plugins:maven-failsafe-plugin](https://github.com/apache/maven-surefire) from 3.5.3 to 3.5.4.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.3...surefire-3.5.4)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-failsafe-plugin
  dependency-version: 3.5.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-22 01:36:20 +00:00
dependabot[bot] 88d828f216 Bump org.eclipse.jetty:jetty-maven-plugin from 11.0.18 to 11.0.26
Bumps org.eclipse.jetty:jetty-maven-plugin from 11.0.18 to 11.0.26.

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-maven-plugin
  dependency-version: 11.0.26
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-15 01:37:45 +00:00
dependabot[bot] b87ec9804c Bump org.apache.maven.plugins:maven-failsafe-plugin from 3.5.2 to 3.5.3
Bumps [org.apache.maven.plugins:maven-failsafe-plugin](https://github.com/apache/maven-surefire) from 3.5.2 to 3.5.3.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.2...surefire-3.5.3)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-failsafe-plugin
  dependency-version: 3.5.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-14 02:10:35 +00:00
Kusal Kithul-Godage 96f838df1e WW-5534 Proper fix ModelDriven parameter injection and allowlisting 2025-03-07 00:07:53 +11:00
Kusal Kithul-Godage d2cb444bcf WW-5376 Fix BOM leaking unrelated dependencies 2025-02-25 19:32:44 +11:00
Kusal Kithul-Godage 077e985899 WW-5532 Upgrade and align various dependencies 2025-02-25 12:25:47 +11:00
Lukasz Lenart d727fbf6be [maven-release-plugin] prepare for next development iteration 2025-02-17 10:41:25 +01:00
Lukasz Lenart 4603706b40 [maven-release-plugin] prepare release STRUTS_7_0_3 2025-02-17 10:41:17 +01:00
Lukasz Lenart a1de1cfdeb [maven-release-plugin] prepare for next development iteration 2025-02-04 07:07:24 +01:00
Lukasz Lenart 9326279769 [maven-release-plugin] prepare release STRUTS_7_0_2 2025-02-04 07:07:15 +01:00
Lukasz Lenart 080263e93f [maven-release-plugin] prepare for next development iteration 2025-02-02 08:26:01 +01:00
Lukasz Lenart f6bf43ae0b [maven-release-plugin] prepare release STRUTS_7_0_1 2025-02-02 08:25:53 +01:00
dependabot[bot] 181f0073ff Bump org.sitemesh:sitemesh from 3.2.1 to 3.2.2
Bumps [org.sitemesh:sitemesh](https://github.com/sitemesh/sitemesh3) from 3.2.1 to 3.2.2.
- [Release notes](https://github.com/sitemesh/sitemesh3/releases)
- [Commits](https://github.com/sitemesh/sitemesh3/compare/3.2.1...3.2.2)

---
updated-dependencies:
- dependency-name: org.sitemesh:sitemesh
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-20 01:07:47 +00:00
dependabot[bot] 9d2eb5e607 Bump org.apache.maven.plugins:maven-failsafe-plugin from 3.5.1 to 3.5.2
Bumps [org.apache.maven.plugins:maven-failsafe-plugin](https://github.com/apache/maven-surefire) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.5.1...surefire-3.5.2)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-failsafe-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-12-16 01:16:38 +00:00
Lukasz Lenart 9aa41f18ae [maven-release-plugin] prepare for next development iteration 2024-12-11 07:56:30 +01:00
Lukasz Lenart 1d95543fbf [maven-release-plugin] prepare release STRUTS_7_0_0 2024-12-11 07:56:16 +01:00
Lukasz Lenart 90c9dfa923 [maven-release-plugin] prepare for next development iteration 2024-11-03 14:51:02 +01:00
Lukasz Lenart 5760d45a3e [maven-release-plugin] prepare release STRUTS_7_0_0_M10 2024-11-03 14:50:53 +01:00
Lukasz Lenart dd6bb139f7 WW-5459 Moves Action interface into org.apache.struts2.action package 2024-11-02 15:09:51 +01:00
Kusal Kithul-Godage 32bc4045ba WW-3714 Moves all classes from com.opensymphony.xwork2 into org.apache.struts2 2024-11-01 19:02:21 +11:00
Kusal Kithul-Godage f55c404d21 Merge branch 'master' into 7.0.x/merge-master-2024-11-01 2024-11-01 15:55:35 +11:00
dependabot[bot] cf6cbf3816 Bump org.apache.maven.plugins:maven-failsafe-plugin from 3.3.1 to 3.5.1
Bumps [org.apache.maven.plugins:maven-failsafe-plugin](https://github.com/apache/maven-surefire) from 3.3.1 to 3.5.1.
- [Release notes](https://github.com/apache/maven-surefire/releases)
- [Commits](https://github.com/apache/maven-surefire/compare/surefire-3.3.1...surefire-3.5.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-failsafe-plugin
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-21 01:48:11 +00:00
Lukasz Lenart ad9224512d WW-5209 Upgrade to Jakarta Bean Validation 3.1.0 2024-10-20 11:35:56 +02:00
Lukasz Lenart 954453b66e Merge pull request #1077 from apache/feature/WW-5472-remove-sitemesh
WW-5472 Removes Struts Sitemesh plugin
2024-10-20 11:10:17 +02:00
Lukasz Lenart 3a08c1094e Merge pull request #1067 from apache/feature/WW-5465-attributes
WW-5465 Renames tag parameters to attributes
2024-10-20 11:05:35 +02:00
Lukasz Lenart ce71dab1de WW-5472 Removes Struts Sitemesh plugin 2024-10-16 12:00:09 +02:00
Kusal Kithul-Godage 58e19dde30 WW-5468 Remove unneeded annotations 2024-10-14 18:52:12 +11:00
Lukasz Lenart 00f979e9c2 WW-5465 Renames tag parameters to attributes 2024-10-13 10:25:13 +02:00