In connection to my post about stroring visitor data: I have there one variable:
This is my variable where I store some data that I need to transfer between pages. One time it's an Integer, other Map or String. Probably that was bad idea, but maybe there's a way to solve it anyway. What the problem is, sometimes I go to a page which awaits other object, because initially I thought it will accessed always after a page which sets correct value. That results in ClassCastException or NullPointers... In this situation only server restart helps. I have few solution in mind (better or worse), but maybe there is any pattern how to cope with such situations.