Skip to content

feat(webapps-neo): Ship the neo webapp with the WildFly distribution - #3885

Closed
javahippie wants to merge 1 commit into
feature/3870-neo-webapp-tomcatfrom
feature/3870-neo-webapp-wildfly
Closed

javahippie wants to merge 1 commit into
feature/3870-neo-webapp-tomcatfrom
feature/3870-neo-webapp-wildfly

Conversation

@javahippie

Copy link
Copy Markdown
Contributor

Related to #3870 (WildFly part).

Stacked on #3884 (Tomcat). This PR targets feature/3870-neo-webapp-tomcat, so the diff only shows the WildFly part. It reuses NeoEnabledFilter, SpaFallbackFilter and the @Produces fix from #3884. Once #3884 is merged and its branch is deleted, GitHub retargets this PR to main.

What

Same use case and behavior as on Tomcat: the WildFly distribution now contains the new web apps, disabled by default, and the legacy web apps stay the standard.

disabled (default) enabled
/ 302 → /operaton/ neo SPA
/operaton/ legacy webapps legacy webapps
other neo paths 404 SPA, assets, /api/admin, /api/engine

Enable it with -Doperaton.bpm.webapp.neo.enabled=true (commented example in bin/standalone.conf{,.bat}) or with OPERATON_BPM_WEBAPP_NEO_ENABLED=true.

How

  • New module distro/wildfly/webapp-neo → operaton-webapp-neo-wildfly.war, a WAR overlay of operaton-webapp-neo:
    • web.xml and config.json are identical to the Tomcat variant. RESTEasy comes from WildFly, so the WAR adds no resteasy-core.
    • The manifest Dependencies and jboss-deployment-structure.xml are copied from the legacy operaton-webapp-wildfly.
    • jboss-web.xml sets context-root to /.
  • Undertow root: removes <location name="/" handler="welcome-content"/> from standalone.xml and standalone-full.xml, which occupied / (this is the counterpart of dropping Tomcat's ROOT app). The unused welcome-content handler definition stays, to keep the diff small.
  • WEB-INF/undertow-handlers.conf adds samesite-cookie(mode=Lax, cookie-pattern=JSESSIONID). Undertow sets the session cookie past SessionCookieFilter, so JSESSIONID came without SameSite, unlike on Tomcat. The Servlet 6 <cookie-config><attribute> alternative is ignored by Undertow; I tried it.

Verification

Smoke test of the built operaton-bpm-wildfly tar.gz on WildFly 41.0.1.Final:

  • Context / registers next to /operaton, /engine-rest, /operaton-invoice and /operaton-welcome, with no deployment errors.
  • disabled: / → 302 /operaton/; /tasks, /config.json, /api/admin/... → 404; legacy welcome → 200
  • enabled (env var):
    • /, /tasks, /processes/invoice → SPA shell; /config.json → JSON; bundle assets → 200; /assets/missing.js → 404; CSP header present
    • JSESSIONID and XSRF-TOKEN carry SameSite=Lax
    • auth with Accept: */*: POST without CSRF token → 403, login demo/demo → 200 JSON, whoami → 200, engine API → 200, anonymous → 401, logout → 200, whoami afterwards → 404
  • Not tested in a real browser, and not tested via standalone.conf (only via the env var).

Notes for review

  • Behavior change: WildFly's welcome page is no longer served at /. With neo disabled, / redirects to the legacy webapps.
  • The legacy webapp on WildFly has the same missing SameSite on JSESSIONID (path=/operaton). That is out of scope here.
  • pr-build.yml only triggers for PRs against main/release/**/staging/** and ignores distro/**, so CI will not run on this PR until it is retargeted.
  • I did not regenerate the committed sbom.cdx.json; CI updates it.

🤖 Generated with Claude Code

- adds operaton-webapp-neo-wildfly, a WAR overlay of operaton-webapp-neo
  with the same web.xml and config.json as the Tomcat variant, the
  legacy webapp's module Dependencies and deployment exclusions, and
  context root / via jboss-web.xml
- removes the undertow welcome-content location for / from
  standalone.xml and standalone-full.xml, which occupied the root
  context
- disabled by default through NeoEnabledFilter, like on Tomcat: when
  off, / redirects to /operaton/ and every other path returns 404
- undertow-handlers.conf adds SameSite=Lax to JSESSIONID; Undertow sets
  the session cookie past SessionCookieFilter and ignores the Servlet 6
  cookie-config attribute
- documents the switch in README.txt and standalone.conf{,.bat}

related to #3870

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@javahippie javahippie added distro:wildfly Issues & changes related to the Wildfly distribution scope:webapp-neo Changes affecting the new webapps. labels Oct 20, 2026
@github-actions github-actions Bot removed the scope:webapp-neo Changes affecting the new webapps. label Oct 20, 2026
@javahippie
javahippie deleted the branch feature/3870-neo-webapp-tomcat October 22, 2026 11:35
@javahippie javahippie closed this Oct 22, 2026
@kthoms
kthoms deleted the feature/3870-neo-webapp-wildfly branch October 22, 2026 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

distro:wildfly Issues & changes related to the Wildfly distribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant