[
https://issues.apache.org/jira/browse/WW-5640?focusedWorklogId=1028215&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1028215
]
ASF GitHub Bot logged work on WW-5640:
--------------------------------------
Author: ASF GitHub Bot
Created on: 06/Jul/26 13:03
Start Date: 06/Jul/26 13:03
Worklog Time Spent: 10m
Work Description: lukaszlenart merged PR #1765:
URL: https://github.com/apache/struts/pull/1765
Issue Time Tracking
-------------------
Worklog Id: (was: 1028215)
Time Spent: 40m (was: 0.5h)
> Add WebJars support to Struts core
> ----------------------------------
>
> Key: WW-5640
> URL: https://issues.apache.org/jira/browse/WW-5640
> Project: Struts 2
> Issue Type: New Feature
> Components: Core
> Reporter: Lukasz Lenart
> Priority: Major
> Fix For: 7.3.0
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> Add first-class WebJars support to Struts core so client-side libraries
> packaged as WebJars (shipped under
> {{META-INF/resources/webjars/<name>/<version>/…}}) can be referenced by a
> version-less logical path and served through Struts' existing static-content
> pipeline.
> Example: a template references bootstrap/css/bootstrap.min.css; Struts
> resolves and serves
> {{META-INF/resources/webjars/bootstrap/5.3.8/css/bootstrap.min.css}}.
> Today plugins and apps vendor client-side assets directly on the classpath
> and re-commit them on every upgrade (the struts2-bootstrap plugin commits
> ~2000 files by hand each release). WebJars replace this with a dependency
> bump (auto-updatable via Renovate/Dependabot).
> Scope (core only):
> - Add {{org.webjars:webjars-locator-lite}} (MIT; one Apache-2.0 transitive
> dep) for version resolution.
> - New {{WebJarUrlProvider}} container bean — the public, injectable seam for
> plugins.
> - Serve {{<staticContentPath>/webjars/**}} via a branch in
> {{DefaultStaticContentLoader}}, reusing existing caching; extend content-type
> coverage for fonts/svg/source-maps.
> - Thin {{<s:webjar>}} tag + {{<@s.webjar>}} macro emitting the resolved URL
> string.
> - New config: {{struts.webjars.enabled}} (default true),
> {{struts.webjars.allowlist}} (optional).
> - Security: constrain resolution to the webjars root, block .. traversal,
> fail closed (404 / no URL) on unresolved paths.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)