title: Universal Reactjs with Nashorn and Tomcat
body: <p>For my current project I'm trying to create a universal reactjs website. My current server architecture restricts me to only use Tomcat application servers. Installing a nodejs server is not an option.</p>
  
  <p>As a POC I use an example repository (<a href="https://github.com/pgrimard/spring-boot-react" rel="nofollow noreferrer">https://github.com/pgrimard/spring-boot-react</a>) that contains react with react-router that renders on the server. While running this example I get the following error:</p>
  
  <pre><code>org.springframework.scripting.support.StandardScriptEvalException: TypeError: 0 ,&gt; u.createServerRenderContext is not a function in &lt;eval&gt; at line number 1
  </code></pre>
  
  <p>This error happens in the server.js file while setting up the react-router context. Does anyone have any experience with bigger react application within a Tomcat container and that use SSR? Or are there any other solutions?</p>
  
  <p>Thanks in advance!</p>