I've been working on a web-based project management system and was wondering how you may do the following:
1) When a user has a new message/comment on activity relating to them I want it to appear on their notifications
2) I want to display the number of notifications they have
So I will have to check the database for messages or comments. But how can I work out if these have not been accessed by the user and therefore whether to include them in the new notifications? Would I have a boolean value checking this somewhere(in a servlet?) which is returned from a database method (check number of times accessed...if zero then show in notifications). Maybe I would have a column in the database which has a value true or false as to whether its been accessed or not which is changed to true if it has been.