Tom,

I would recommend storing the user information in the session (I use POJO's) as you have suggested. Then you can access it from the session to preopulate the form. Your approach sounds correct.

We're storing user information in the session on our project because its constantly being used for almost every single action. Whether its looking up a persons workload or submitting their changes to a document, etc. So for us, it made sense to put this in the session. That's actually the only information that we really store in the session. The rest we use forms for.

As for the form information disappearing, you can change the scope of the form to be session (actually this is default for struts but you may have set it to request.)

HTH,
sean


Tom Holmes Jr. wrote:

I did some research before this before posting, and I apologize if this is a simple stupid question.

With my web-site, a user is going to login, when they enter in the username and password, the data from that user will be retrieved from the database so we can validate the username and password. If the username and password match, I want to store that User in session, or somewhere, so I can keep that information all over the site. The information in the session won't be too large.

Also, when the user creates a new Member to the site, I want to at that time also hold the information in session, or whereever, so ... the question I have is ... would this be the UserDTO information? Because the form-bean information seems to go away and refresh every time we reload the form, so it seems to me that if the user went to edit his information, then I would transfer the UserDTO information (stored in session?) to the form as default values.

Thanks for all the help, and sorry to be a bother ....

                Tom

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to