We have an application in pure JSP/JQuery which we are trying to move to ReactJs for maintainability. One of the benefits of ReactJs I am seeing is server side rendering. However, all the examples I have seen of server side rendering utilize Node.js as a server side. We are currently using Tomcat and not so much inclined to deploy node.js just for server side rendering.
I have considered few alternatives such as using Nashorn (http://winterbe.com/posts/2014/04/05/java8-nashorn-tutorial/)
However, Nashorn doesn't seem to be production ready.
Has anyone deployed React.js with server side rendering on Tomcat on production?
Trying to render a Javascript app serverside without NodeJS is an excellent way to torture yourself. Trying to run javascript inside a jvm is even worse. I would recommend against it.
It is possible to render the complete client server side using PhantomJS (which technically runs without Node) or even using xvfb and Chrome on *nix. All have been done, with various degrees of painful debugging.
Running the javascript inside tomcat itself is rather unusual… I can't see the point other than "because we can". My best guess is that nobody is doing that in production.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With