Skip to content

Upgrade SiteMesh to 3.3.0-M3#15975

Merged
jdaugherty merged 1 commit into
apache:8.0.xfrom
codeconsole:deps/sitemesh-3.3.0-M3
Jul 11, 2026
Merged

Upgrade SiteMesh to 3.3.0-M3#15975
jdaugherty merged 1 commit into
apache:8.0.xfrom
codeconsole:deps/sitemesh-3.3.0-M3

Conversation

@codeconsole

Copy link
Copy Markdown
Contributor

Bumps spring-boot-starter-sitemesh / spring-webmvc-sitemesh from 3.3.0-M2 to 3.3.0-M3.

Why

M3 fixes the response charset in the view-resolver integration. Under M2, SiteMeshView stamped a charset-less text/html onto the real response before the inner view rendered. Grails GSP only applies its configured content type (text/html;charset=UTF-8) when none is set yet, so it backed off — and the response went out with the servlet container's locale-derived charset instead. Net effect: decorated pages served most non-English locales as ISO-8859-1, destroying all non-Latin-1 text (Cyrillic, Thai, Chinese, Czech, ...). Only locales whose container mapping happened to be UTF-8 rendered correctly.

M3 lets the inner view own the content type (enableBuffering is now the public API for unconditional buffering) and restores the text/html default only when the view declines to set one.

Also in M3

  • The invasive wrap-all default is replaced by a non-invasive delegating resolver — no ViewResolver bean is replaced or retyped. Grails' bean-definition / bean-instance integrations are unaffected and keep priority through the starter's extension contract (verified: single decoration pass).
  • SiteMeshViewResolver.decorate(View) for views a handler resolves manually and returns directly.
  • SiteMeshViewContext is created after the render, so custom content processors and decorator selectors observe the actual response content type.
  • The starter's early post-processors bind sitemesh.* from the Environment, so wrapMode=bean-definition no longer ignores a configured targetBeanName.
  • Decorator-chain parsing is centralized and whitespace-tolerant ("inner, outer" works in meta tags, request attributes, and configuration alike).

Verification (against the released Central artifact)

  • :grails-sitemesh3:test — green (forced rerun)
  • :grails-test-examples-gsp-sitemesh3:check — 21 integration tests green (forced rerun), covering forced layouts, decorator chaining, JSP, plain text, and error-page decoration
  • A generated application serves all 18 bundled locales as charset=UTF-8 with strict byte-level validation of the translated content

Companion to #15974, which internationalizes the default welcome page — correct rendering of its non-Latin-1 locales depends on this upgrade.

M3 fixes the response charset in the view-resolver integration: the
buffering view no longer stamps a charset-less text/html default onto
the response before the inner view renders, so GSP's configured UTF-8
content type is applied instead of the container's locale-derived
charset. Before this, decorated pages served most non-English locales
as ISO-8859-1, garbling all non-Latin-1 text.

The release also makes enableBuffering the public API for unconditional
buffering, replaces the wrap-all default with a non-invasive delegating
resolver (Grails' bean-definition/bean-instance integrations are
unaffected and keep priority through the extension contract), adds
SiteMeshViewResolver.decorate(View) for handler-returned views, defers
SiteMeshViewContext creation until the rendered content type is known,
binds the starter's early post-processors from the Environment, and
centralizes decorator-chain parsing.

Verified against the released artifact: :grails-sitemesh3:test and the
gsp-sitemesh3 functional suite pass, and a generated application serves
all 18 bundled locales as charset=UTF-8 with byte-valid content.
@jdaugherty

Copy link
Copy Markdown
Contributor

This is required for us to reroll the 8.0.0-M3 release. I've tested the apps locally and tests and see no issues. I'm merging so we can get teh release out.

@jdaugherty jdaugherty merged commit 221e4f6 into apache:8.0.x Jul 11, 2026
53 of 54 checks passed
@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 49.6698%. Comparing base (08bd0bf) to head (1c00628).
⚠️ Report is 2 commits behind head on 8.0.x.

Additional details and impacted files

Impacted file tree graph

@@                Coverage Diff                 @@
##                8.0.x     #15975        +/-   ##
==================================================
- Coverage     49.6709%   49.6698%   -0.0011%     
  Complexity      17017      17017                
==================================================
  Files            2004       2004                
  Lines           93896      93896                
  Branches        16448      16448                
==================================================
- Hits            46639      46638         -1     
- Misses          40078      40079         +1     
  Partials         7179       7179                

see 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants