Leena said:
I first time read a solution like that Dilip. Is this widely used in the industry? I doubt this.
Creating a class to hold user specific data is done all the time. For one thing, it makes things simpler than plugging various bits into the session and hauling them back out again. Note that we are NOT talking about putting everything you use in this class, just the user specific data. If you are using
JSP, this class is an obvious candidate for the JavaBean interface.
Another (frequently un-appreciated) reason to create such a user-specific class is the ease of debugging. You can
test it outside the servlet environment - a vast simplification.
Bill
(Avoid the SingleThreadModel like the plague - if you think you need it, your architecture is wrong.)
[ July 12, 2004: Message edited by: William Brogden ]