You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Greg Lindholm <gr...@gmail.com> on 2016/04/29 16:58:50 UTC

Empty parameters with the tag

I discovered a problem with the <s:param /> tag when attempting to pass an
empty parameter.

<s:url var="myUrl" action='MyAction'>
     <s:param name="p1" value=""/>
     <s:param name="p2"></s:param>
</s:url>

I was attempting to pass an empty parameter using the "p1" syntax above and
the parameter was being suppressed.

Using the "p2" syntax it works correctly, and the empty parameter is
included.

The doc http://struts.apache.org/docs/param.html says that
"suppressEmptyParameters" defaults to false but the p1 parameter was always
suppressed even if I added suppressEmptyParameters="false".

Also the doc http://struts.apache.org/docs/param.html has an incorrect
example on how to use the suppressEmptyParameters option.

<s:param name="suppressEmptyParameters" value="true"/>

Greg

Re: Empty parameters with the tag

Posted by Greg Lindholm <gr...@gmail.com>.
Sure.
Added https://issues.apache.org/jira/browse/WW-4631

Greg

On Tue, May 3, 2016 at 4:45 AM, Christoph Nenning <
Christoph.Nenning@lex-com.net> wrote:

> > I discovered a problem with the <s:param /> tag when attempting to pass
> an
> > empty parameter.
> >
> > <s:url var="myUrl" action='MyAction'>
> >      <s:param name="p1" value=""/>
> >      <s:param name="p2"></s:param>
> > </s:url>
> >
> > I was attempting to pass an empty parameter using the "p1" syntax above
> and
> > the parameter was being suppressed.
> >
> > Using the "p2" syntax it works correctly, and the empty parameter is
> > included.
> >
> > The doc http://struts.apache.org/docs/param.html says that
> > "suppressEmptyParameters" defaults to false but the p1 parameter was
> always
> > suppressed even if I added suppressEmptyParameters="false".
> >
> > Also the doc http://struts.apache.org/docs/param.html has an incorrect
> > example on how to use the suppressEmptyParameters option.
> >
> > <s:param name="suppressEmptyParameters" value="true"/>
> >
> > Greg
>
>
> Thanks for reporting. Could you please create a jira issue for that?
>
>
> https://issues.apache.org/jira/browse/WW/
>
>
> Regards,
> Christoph
>
> This Email was scanned by Sophos Anti Virus
>

Re: Empty parameters with the tag

Posted by Christoph Nenning <Ch...@lex-com.net>.
> I discovered a problem with the <s:param /> tag when attempting to pass 
an
> empty parameter.
> 
> <s:url var="myUrl" action='MyAction'>
>      <s:param name="p1" value=""/>
>      <s:param name="p2"></s:param>
> </s:url>
> 
> I was attempting to pass an empty parameter using the "p1" syntax above 
and
> the parameter was being suppressed.
> 
> Using the "p2" syntax it works correctly, and the empty parameter is
> included.
> 
> The doc http://struts.apache.org/docs/param.html says that
> "suppressEmptyParameters" defaults to false but the p1 parameter was 
always
> suppressed even if I added suppressEmptyParameters="false".
> 
> Also the doc http://struts.apache.org/docs/param.html has an incorrect
> example on how to use the suppressEmptyParameters option.
> 
> <s:param name="suppressEmptyParameters" value="true"/>
> 
> Greg


Thanks for reporting. Could you please create a jira issue for that?


https://issues.apache.org/jira/browse/WW/


Regards,
Christoph

This Email was scanned by Sophos Anti Virus