Let me just say I have a small web site that contain several pages, the first page maybe the login page, after that I can ask the user to enter his name, next page I ask him to enter department, and last page I ask him to enter the salary. Then needless to say, I ask him to click on insert button the data is inserted into database.
A naive approach will be that I create an object Employee, the first page I set the name attribute, and then I put this object Employee to the J2EE session (something like session.setAttribute("employee",employeObject), on next page user sets the department attribute, and last the user sets the salary attribute. On each page I should get the session object so that it keeps the state of the converational info.
Then how about to employee stateful Entity session bean?-- not very familar with this, I want to know what is in nature the difference between these two ways. What is the pros and cons.