Lukasz Lenart created WW-5653:
---------------------------------
Summary: Upgrade bundled Bootstrap in sample apps from 3.3.4 to
5.3.x
Key: WW-5653
URL: https://issues.apache.org/jira/browse/WW-5653
Project: Struts 2
Issue Type: Improvement
Components: Example Applications
Reporter: Lukasz Lenart
Fix For: 7.3.0
h2. Summary
Upgrade the bundled Bootstrap in the sample applications from the current
*3.3.4* to the latest *5.3.x* release. Bootstrap 3.3.4 (released 2015) is long
out of support, ships known-vulnerable assets, and predates the removal of the
jQuery dependency in Bootstrap 5.
h2. Current State
* {{apps/showcase}} bundles static Bootstrap 3.3.4 assets:
** {{src/main/webapp/styles/bootstrap*.css}} (+ {{bootstrap-theme}})
** {{src/main/webapp/js/bootstrap.min.js}}
* {{apps/rest-showcase}} bundles the same static Bootstrap 3.3.4 CSS under
{{src/main/webapp/css/}}.
* Assets are checked into the repo and loaded via {{<s:link>}} / {{<s:script>}}
in the decorators (e.g.
{{apps/showcase/src/main/webapp/WEB-INF/decorators/main.jsp}}).
* Roughly *78 JSP files* in {{apps/showcase}} depend on Bootstrap 3 markup
(glyphicons, {{panel-*}}, {{navbar-*}}, {{col-xs-*}}, {{btn-*}} conventions).
h2. Motivation
* Bootstrap 3.3.4 is unsupported and carries known XSS advisories fixed in
later releases.
* Bootstrap 5 *removes the jQuery dependency entirely*, which unblocks and
simplifies the separate effort to migrate the sample apps to the framework's
{{<s:webjar>}} support.
* Keeps the showcase — the framework's public demo app — on a current,
maintained UI toolkit.
h2. Scope of Work
# Replace bundled Bootstrap 3.3.4 assets with Bootstrap 5.3.x in
{{apps/showcase}} and {{apps/rest-showcase}}.
# Migrate Bootstrap 3 markup to Bootstrap 5 across all affected JSPs:
#* {{glyphicon}} icons are removed in BS4+ — replace with an alternative (e.g.
Bootstrap Icons, or inline SVG).
#* {{panel-*}} → {{card-*}}.
#* {{navbar}} markup and toggle behavior rewritten in BS5.
#* Grid changes ({{col-xs-*}} removed, {{col-*}} breakpoints reworked).
#* {{data-*}} JS hooks now namespaced as {{data-bs-*}}.
# Update the decorators to drop the jQuery {{<s:script>}} include where it
existed only to satisfy Bootstrap (Bootstrap 5 needs no jQuery). Retain jQuery
only where the sample pages use it directly.
# Verify all showcase pages render and interactive components (dropdowns,
modals, collapses, tooltips) work in a real browser.
h2. Risks / Notes
* This is a *breaking UI migration*, not a version bump — BS3 → BS5 has no
drop-in compatibility path. Expect changes in most showcase JSPs.
* Coordinate with the "migrate showcase to {{<s:webjar>}} support" effort —
dropping jQuery here changes that ticket's calculus.
* Consider whether Bootstrap assets should be pulled via WebJars as part of
this work rather than re-bundling static files.
h2. Acceptance Criteria
* No Bootstrap 3.x assets remain in {{apps/showcase}} or {{apps/rest-showcase}}.
* All showcase and rest-showcase pages render correctly with Bootstrap 5.3.x.
* Interactive Bootstrap components function without jQuery.
* Build passes ({{mvn clean install -DskipAssembly}}) and the apps deploy and
run.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)