I think I should use the application scope session to deal with that. But I do not have any experience about that. I tried different ways I got from the internet like:
You can use a ThreadLocal variable to keep your data. You then get the data from the variable and clean it. Don't forget to make your variable public and static to reach it from another class.