I have two scenes Login.fxml and MainView.fxml and two different controllers LoginController.java and MainViewControler.java
In LoginController, I do the whole process to log in and get the JSessionID value and save it in an object, as shown below:
loginGateway = loginGateway(gateway);
Now in MainViewController I need to use this object (loginGateway) for getJSessionID and make other requests to the server. But how can I use this object in another controller class (MainViewController.java) ????
source share