lundi 8 juin 2015

Java EE save Data in Sessionbean [duplicate]

I'm totally new to Java EE so there may be some general misconceptions from my side.
The actual idea is like the following:

There are 2 classes (Named Beans RequestScoped) and one stateful bean called holder, that holds an Object. Class1 interacts with the user, gets some information and stores this information as an object in the HolderClass. I am now redirected to another page (using a button from primefaces with the action attribute) where Class2 wants to get the information Class1 saved in the HolderClass.
But there is no object in the HolderBean anymore. If I ask for the saved object before redirect, it is saved, if I ask after redirect it is null. As I mentioned, maybe stateful beans are not the right way to do this, so if they aren't is there another way to do this?

Aucun commentaire:

Enregistrer un commentaire