My workplace is a bird conservation non-profit with java code from 2006 and the website is many jsp files.
I've added a react SSR system. It has node subprocess code for rendering HTML from java via stdin/stdout. There's a Node/Vite proxy server that adds the fancy HMR you expect from SPA apps.
It supports multiple roots on a page, every SSR component has data-props and data-componentname, and the entry script just queries those attributes and hydrates everything.
The node renderer script is packaged as an EXE which is deployed in WEB-INF on the server.
It's fun to add the amazing React tooling to an old codebase. It also shows how you really, really, really do not need NextJS.