• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem of wrong variable data  RSS feed

Michal Glowacki
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In connection to my post about stroring visitor data: I have there one variable:

Object temporaryObject;

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.

Can anyone help?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!