I have a project for school and I have to use Java. Recently I found play framework and I want to try to use it. It\'s easy enough for a quick start, but I ran into a problem wi
Use Java Serialization to serialize a Hashmap to a file or to the database. Name the file or id column after a unique identifier you store in the user's cookie. Then put the User object in the hashmap before you serialize the hashmap. Now you have a persistent store that you can access. When the framework forgets the User object or any other session information, you can deserialize the Hashmap. Then write some static helper methods, static Object SessionDB.get(String id, String key) and SessionDB.put(String id, String key, Object value). I use this method on my homemade framework to store session information over a small server farm. Of course I use the database, not a file system.