title: How can I use a variable from another Controller in JavaFX
body: <p>I have two scenes Login.fxml and MainView.fxml and two diferent controllers LoginController.java and MainViewControler.java</p>
  
  <p>In LoginController I do the whole process to login and get the value of JSessionID and store it in a object, like below:</p>
  
  <pre><code>loginGateway = loginGateway(gateway);
  </code></pre>
  
  <p>Now in MainViewController I need to use the this object (loginGateway) to getJSessionID and make other requests to the server. But how can I acess this object in another Controller Class (MainViewController.java) ????</p>