Hello,

I would like to hear your opinion about the following:

In my webapp, when a user clicks a link, a custom type object is created in an action, then control is forwarded to a jsp view that shows some data taken from that object and a form where the user can enter some information and then submit the form. In the action associated with the form I would like access the previously created object again.

As the form submission is a new request, I store the object as attribute in session scope in the first action to be able to access it in the second action. When the second action completes, I remove the attribute from the session.

Is it good or bad practice? I really would like to use request scope instead, but I don't find a way to do that. Normally hidden fields are used in that case, but they can only be Strings, right?

What I don't like so much about session scope is, that if a user chooses not to submit the form, the second action will not remove the attribute with the object, and it will "hang around" until the session expires or the user clicks the link again and submits the form.

I found some posts where similar topics where discussed, but I'm still not sure if it's the right way what I'm doing or not.

Thanks very much in advance!

Torsten



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



Reply via email to