46 Commits

Author SHA1 Message Date
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
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 7b84357686 Merge remote-tracking branch 'origin/master' into 7.0.x/merge-master-2024-07-20 2024-07-20 13:36:38 +10:00
Kusal Kithul-Godage f9953938f7 WW-5440 Add missing annotations 2024-07-13 21:57:26 +10:00
Lukasz Lenart 6ce1e9ea3e Upgrades Htmlunit to version 3.6.0 2023-12-16 11:11:56 +01:00
Lukasz Lenart c99526ce1f WW-5296 Uses proper DTDs 2023-05-16 20:22:03 +02:00
Lukasz Lenart 3774ffa7c3 WW-5234 Improves DTD definitions to use proper URL 2022-09-27 09:21:03 +02:00
Lukasz Lenart 9a2996f9b7 Uses proper Servlet API 3.1 headers 2022-06-10 16:06:27 +02:00
JCgH4164838Gh792C124B5 583d399c24 Update:
- Fix REST Showcase JSP issue for s:link tags that replaced HTML link tags.
- s:link tags cannot use JSP EL in them.  Modified JSPs to use scriptlet,
JSP expression, and OGNL expression to work with s:link tag.
2021-12-27 21:23:35 -05:00
Yasser Zamani f70999c401 fix tags 2020-09-11 01:04:06 +04:30
Ecenaz Ozmen 62424ef30c Refactoring script and link elements for CSP nonce propagation 2020-08-31 11:39:57 +03:00
Johannes Geppert bbe46e92f0 Fix compile issue of post order test example with latest http client version 2019-02-09 15:32:02 +01:00
Lukasz Lenart 1f5d29ac68 Uses proper headers in web.xml 2018-03-20 15:42:07 +01:00
Lukasz Lenart 6c5b79c204 Adds explanation how to use the commented configuration 2018-02-27 11:13:39 +01:00
Lukasz Lenart ce1ac9d381 Adds example how to use the handler 2018-02-20 06:50:06 +01:00
Lukasz Lenart a03373022d Adds missing header with license 2017-10-21 18:40:42 +02:00
Lukasz Lenart e7c65fb0b4 Adds missing header with license 2017-10-21 17:47:51 +02:00
Lukasz Lenart fd8e3bc912 Adds missing header with license 2017-10-21 11:51:44 +02:00
Lukasz Lenart 73359c480b Adds missing header with license 2017-10-21 11:24:48 +02:00
Lukasz Lenart e678792430 Adds missing header with license 2017-10-21 11:01:31 +02:00
Lukasz Lenart 3c68a3def6 WW-4533 Reverts the old behaviour of how empty action should be handled 2016-03-10 08:46:59 +01:00
Johannes Geppert a6241552b6 WW-4540 Enable Strict DMI be default
- Add to global allowed methods to rest showcase configuration
2015-10-05 21:25:06 +02:00
Johannes Geppert e10658cb3c WW-4547 - Rest showcase does not show the validation result 2015-09-10 17:37:41 +02:00
Lukasz Lenart fd0db86560 WW-4518 Moves the new filters to proper package 2015-06-23 17:36:32 +02:00
Johannes Geppert 72e6f70733 Refactor showcase and migrate to bootstrap 3 2015-05-28 21:26:48 +02:00
Johannes Geppert 093532edc2 WW-4492 Add support for Log4J2 as a struts and xwork logging backend
- Use new log4j2 in blank and rest showcase app
 - Migrate to newer jetty plugin version
2015-04-18 21:15:48 +02:00
Johannes Geppert 3826c3098f Switch to latest bootstrap version 3.2.0 in REST Showcase 2014-08-31 14:55:05 +02:00
Lukasz Lenart c1c10e017b Adds default velocity.properties with disabled logging 2014-08-26 08:37:17 +02:00
Lukasz Lenart f1861adff4 Adds proper logging dependency and configuration 2014-08-07 07:42:15 +02:00
Lukasz Lenart 95b309a9b9 Adds security constraints to web.xml to block access to pure JSP files 2014-03-02 21:13:38 +01:00
Christian Grobmeier 5e3e793576 removed unused site folder and site.xml
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1521449 13f79535-47bb-0310-9956-ffa450edef68
2013-09-10 12:08:04 +00:00
Lukasz Lenart eb2a9eb8ff WW-3593 Adds missing html files
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1486344 13f79535-47bb-0310-9956-ffa450edef68
2013-05-25 16:37:42 +00:00
Johannes Geppert 506639be65 WW-3897 Refactor the Struts2 REST Showcase
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1397692 13f79535-47bb-0310-9956-ffa450edef68
2012-10-12 19:04:04 +00:00
Lukasz Lenart 77ce77d342 Solves problem with rest-showcase app and adds additional test to proof how excludePackages works
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1367763 13f79535-47bb-0310-9956-ffa450edef68
2012-07-31 20:38:52 +00:00
René Gielen 4a5211716f WW-3757
Show how to produce sanitized output of user inputted data

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1290827 13f79535-47bb-0310-9956-ffa450edef68
2012-02-18 17:44:04 +00:00
Johannes Geppert 970251ff95 Update to current 2.3 DTD
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@1221225 13f79535-47bb-0310-9956-ffa450edef68
2011-12-20 12:22:28 +00:00
Musachy Barroso f41ffc2421 WW-2926 Port rest-showcase to use convention plugin
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@728041 13f79535-47bb-0310-9956-ffa450edef68
2008-12-19 15:03:25 +00:00
Musachy Barroso 33113a90c6 WW-2926 Port rest-showcase to use convention plugin
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@727908 13f79535-47bb-0310-9956-ffa450edef68
2008-12-19 03:15:23 +00:00
Donald J. Brown 18724a34cb Making the base url of the integration tests configurable
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@681695 13f79535-47bb-0310-9956-ffa450edef68
2008-08-01 13:56:28 +00:00
Donald J. Brown 3d0cd93746 Adding a few functional tests and test runs against multiple servers using my new maven-itblast-plugin
WW-2471


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@680707 13f79535-47bb-0310-9956-ffa450edef68
2008-07-29 14:17:17 +00:00
Donald J. Brown 78e853bcb3 Repackaging new dispatchers, adding "unsupported" servlet dispatcher, fixing a spring issue where
it was needlessly tied to WebApplicationContext and a rest issue where the autowiring of returned
result objects wasn't copied into the rest plugin from xwork
WW-2193


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@674498 13f79535-47bb-0310-9956-ffa450edef68
2008-07-07 14:10:42 +00:00
Donald J. Brown 8d395ee27c Adding new filter to rest showcase
WW-2193


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@670310 13f79535-47bb-0310-9956-ffa450edef68
2008-06-22 04:03:27 +00:00
Antonio Petrelli 4e7c6b76c6 WW-2421
Fixed Subversion properties.
Removed "velocity-tools" wrong transitive dependencies.

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@614309 13f79535-47bb-0310-9956-ffa450edef68
2008-01-22 20:26:23 +00:00
Ted Nathan Husted 1aff95d29c WW-2421 Move devMode true setting from web.xml in REST showcase application to the documentation page.
Experience shows that if we set such things in examples, people will monkey them in production applications (and then blame the framework for poor performance). I strongly suggest that we try to make all examples both production-quality and production-ready. 

git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@611829 13f79535-47bb-0310-9956-ffa450edef68
2008-01-14 15:23:36 +00:00
Donald J. Brown 3e5e82dde6 Setting devmode properly
git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@595849 13f79535-47bb-0310-9956-ffa450edef68
2007-11-16 22:30:57 +00:00
Donald J. Brown 8334897347 Moving rest app over the apps area
WW-2312


git-svn-id: https://svn.apache.org/repos/asf/struts/struts2/trunk@594767 13f79535-47bb-0310-9956-ffa450edef68
2007-11-14 05:06:19 +00:00