You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Dhruva B. Reddy" <sl...@yahoo.com> on 2004/11/12 18:12:35 UTC
Request Parameters Not Showing up in Struts Form
I am using Struts 1.1, and I need to get to an Action with a GET
request (with parameters in the URL, as opposed to an HTML form). If I
dump the query string in the Action, I can see that all the parameters
are getting through. However, the Action's form is not populated
properly--I only get the first parameter.
I cannot find any information about this by Googling. Has anyone
encountered this before?
Thanks,
Dhruva
__________________________________
Do you Yahoo!?
Check out the new Yahoo! Front Page.
www.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Request Parameters Not Showing up in Struts Form
Posted by "Dhruva B. Reddy" <sl...@yahoo.com>.
I figured out why this is happening.
I use the html:rewrite tag to create the URLs. The problem is, it
expands the "&" parameter separator into "&", which is not parsed
properly.
Is there any way to get the tag not to do this (again this is Struts
1.1)? Failing that, is there another easy way to create the URL?
Thanks,
Dhruva
--- Rick Reumann <st...@reumann.net> wrote:
> Dhruva B. Reddy wrote the following on 11/12/2004 12:12 PM:
> > I am using Struts 1.1, and I need to get to an Action with a GET
> > request (with parameters in the URL, as opposed to an HTML form).
> If I
> > dump the query string in the Action, I can see that all the
> parameters
> > are getting through. However, the Action's form is not populated
> > properly--I only get the first parameter.
>
> Things to check...
>
> 1) You sure you have proper set/get methods
> 2) You sure the names match (your request params and the field names
> in
> the form)
> 3) You are using the correct form bean name for the action mapping
> defined in your struts-config
>
> How are you sure the ActionForm's first field is being populated? Do
> you
> have some debugging in the form to make sure it's being set? Are you
> testing for the vars being set in the Action that you submit to? You
> sure the form doesn't have session scope and the field you think is
> being set isn't being carried over from being set somewhere else in
> the app?
>
> --
> Rick
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Request Parameters Not Showing up in Struts Form
Posted by Rick Reumann <st...@reumann.net>.
Dhruva B. Reddy wrote the following on 11/12/2004 12:12 PM:
> I am using Struts 1.1, and I need to get to an Action with a GET
> request (with parameters in the URL, as opposed to an HTML form). If I
> dump the query string in the Action, I can see that all the parameters
> are getting through. However, the Action's form is not populated
> properly--I only get the first parameter.
Things to check...
1) You sure you have proper set/get methods
2) You sure the names match (your request params and the field names in
the form)
3) You are using the correct form bean name for the action mapping
defined in your struts-config
How are you sure the ActionForm's first field is being populated? Do you
have some debugging in the form to make sure it's being set? Are you
testing for the vars being set in the Action that you submit to? You
sure the form doesn't have session scope and the field you think is
being set isn't being carried over from being set somewhere else in the app?
--
Rick
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org