Hi,
When you use request.setAttribute() in Action, it is the same
request which goes to JSP also. So, you are able to get the values in JSP
through request.getAttribute(). But when you use request.setAttribute() in
JSP and submit the form, then a new request is generated with the values
that are contained in the current form and that new request erases all the
previous values. If you want to use these values in the Action also, you
need to set them to session rather than request.
Regards,
Rajasekhar Cherukuri
Deepa Khetan <[EMAIL PROTECTED]>
10/27/2005 02:22 PM
Please respond to
"Struts Users Mailing List" <[email protected]>
To
[email protected]
cc
Subject
Problem with request.setAttribute
Hi,
I have a observed a peculiar behaviour with Struts. We cannot use
request.setAttribute() while passing values from JSP to Action class. It
works fine if i do it from Action to JSP. but when i use it in JSP and
retreive value in Action class, it results in null. Can anyone please
explain why this happens?
Deepa
ForwardSourceID:NT00006B3E
Notice: The information contained in this e-mail message and/or attachments to
it may contain confidential or privileged information. If you are not the
intended recipient, any dissemination, use, review, distribution, printing or
copying of the information contained in this e-mail message and/or attachments
to it are strictly prohibited. If you have received this communication in
error, please notify us by reply e-mail or telephone and immediately and
permanently delete the message and any attachments. Thank you