Should I make that utility class static and have only one instance of it throughout the web app? Would that simplify things so that every session didn't have to store one more thing?
Why would anything need to be stored in the session at all?
Your servlet (or better yet, business layer) could create and invoke an instance of this 'file manager' class without having to store it in the session.
I assume you have a business layer object or hierarchy that checks access rights for each user based upon login credentials that the file manager could use to check whether access should be permitted or not.
Originally posted by Stephen Huey:
That sounds like a good way to say it! So...avoid static classes unless it's one used for something like dynamic system config, right?
yeah we can use static for system config. i think its not about dynamic or static.
some folks say "dont use static at all, because its a violation to OO, use final instead."
actually we use static when need to load everything at compilation.