Is there a way to avoid null-valued (or empty-valued) parameters to be
explicitely mentioned in the URL generated by a form submitted through the
GET method?

For instance, here's a form:

<s:form action="myAction" method="get">
    <s:textfield name="param1" />
    <s:textfield name="param2" />
    <s:submit />
</s:form>

If the user types "FOO" in the first textfield and nothing in the second,
the submitted URL will be something like:
http://myhost.com/myAction.action?param1=FOO&param2=

Can I get rid of the "param2=" part, which serves no purpose?

(The alternative would be to POST the method to an action that would merely
redirect to the desired action, dropping the undesired parameters along the
way.)

Reply via email to