mirror of
https://github.com/apache/struts.git
synced 2026-08-07 15:46:57 +00:00
main
2 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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> |
||
|
|
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> |