Hi,
You should use
request.getParameter("name")
request.getParameter("age")
to get the values from the request. I don't think the values set
through through query string will be set to ActionForm automatically. In
this case you should explicitly call the setter methods of the ActionForm
and then set the new ActionForm object to session with the same name that
was used in the action element attribute "attribute" in struts-config.xml.
Regards,
Rajasekhar Cherukuri
"R.Vijayaraghavan" <[EMAIL PROTECTED]>
10/21/2005 03:40 PM
Please respond to
"Struts Users Mailing List" <[email protected]>
To
"Struts Users Mailing List" <[email protected]>
cc
Subject
query string parameters problem
Hello,
I have 3 variables, namely age, name and description. I have the values
for
name and age before sending the request. That is, my URL would look like
http://localhost:8080/vijay/submit.do?name=xyz&age=22
I have a form that sets the values of age and name which is then accessed
in
a html page using bean:write. In the html page, the user will enter the
description in the corrosponding textarea.
The action is set to /submit.do. Since I am only sending the description
in
the http request, only the setDescription() method should be called and it
happens so. The problem is when I try to access the age and name variables
from the ActionForm in the Action class, I get null. Why so? I am not
setting age and name after submitting the form, they are already set. The
form is in session scope, so shouldn't it be re-used.
Or am I understanding it in-correctly.
regards,
vijay.
Sorry if the subject of the mail is not proper, I couldn't think of any
other subject.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ForwardSourceID:NT000066BE
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