[ 
https://issues.apache.org/jira/browse/WW-5640?focusedWorklogId=1028221&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-1028221
 ]

ASF GitHub Bot logged work on WW-5640:
--------------------------------------

                Author: ASF GitHub Bot
            Created on: 06/Jul/26 13:22
            Start Date: 06/Jul/26 13:22
    Worklog Time Spent: 10m 
      Work Description: lukaszlenart opened a new pull request, #315:
URL: https://github.com/apache/struts-site/pull/315

   Documents the new WebJars support landing in **Struts 7.3.0** 
([WW-5640](https://issues.apache.org/jira/browse/WW-5640), core PR 
[apache/struts#1765](https://github.com/apache/struts/pull/1765), merged to 
`main`).
   
   The feature is additive and backward compatible, so no migration note is 
required.
   
   ## Changes
   
   - **`tag-developers/webjar-tag.md`** (new) — reference page for the 
`<s:webjar>` tag / `<@s.webjar>` macro. Modeled on `script-tag.md`; pulls 
description/attributes from the released source via `remote_file_content`, 
cross-links Static Content and the script/link tags.
   - **`tag-developers/tag-reference.md`** — lists `webjar` under *Other Tags*.
   - **`core-developers/static-content.md`** — new "WebJars support" section: 
the `/static/webjars/**` serving pipeline, version-less resolution, the 
`struts.webjars.enabled` / `struts.webjars.allowlist` constants, fail-closed 
security constraints, and the `WebJarUrlProvider` extension seam.
   
   All details were verified against the merged core source 
(`default.properties`, `StrutsConstants.java`, tag `*-attributes.html` 
fragments), not the JIRA proposal.
   
   ## Notes
   
   - Local Jekyll build could not run (system Ruby env missing 
`public_suffix`); relying on the staging auto-build.
   - The `webjar-attributes.html` / `webjar-description.html` fragments 
referenced via `remote_file_content` already exist on `apache/struts/main`, so 
the includes will render.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)




Issue Time Tracking
-------------------

    Worklog Id:     (was: 1028221)
    Time Spent: 50m  (was: 40m)

> 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: 50m
>  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)

Reply via email to