You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Bhaarat Sharma <bh...@gmail.com> on 2009/06/21 01:16:59 UTC

using multiple param in s:url tag

Hello,

I am using param tag inside s:url tag like the following

<td class="nav">
       <s:url action="ActionEditSave" method="input" id="url">
                   <s:param name="fmrTenant.sSN" value="sSN"/>
                  <s:param name="fmrTenant.hshid" value="hshid"/>
       </s:url>
       <a href="<s:property value="#url"/>"><s:text name="tenant.edit"/></a>
</td>

hshid is int
sSN is string

However, in the final URL the two parameters are separated by &amp;  This
should not be there.  Does anyone know how to avoid &amp;?

Re: using multiple param in s:url tag

Posted by Dave Newton <ne...@yahoo.com>.
Bhaarat Sharma wrote:
> had to used 'escape' in s:property tag.
> 
> like this: <s:property value="#url" escape="&amp;"/>

Just FYI, the "escape" attribute is a boolean (true/false).

I forget when <s:url>'s "escapeAmp" property was added--knowing what 
version of S2 you're using would be a helpful diagnostic.

Dave

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: using multiple param in s:url tag

Posted by Bhaarat Sharma <bh...@gmail.com>.
nevermind..solved it.

had to used 'escape' in s:property tag.

like this: <s:property value="#url" escape="&amp;"/>

On Sat, Jun 20, 2009 at 7:25 PM, Bhaarat Sharma <bh...@gmail.com> wrote:

> according to documentation...if I try to use escapeAmp property in my s:url
> tag then I get the following error...
>
> Attribute escapeAmp invalid for tag url according to TLD
>
>
> On Sat, Jun 20, 2009 at 7:16 PM, Bhaarat Sharma <bh...@gmail.com>wrote:
>
>> Hello,
>>
>> I am using param tag inside s:url tag like the following
>>
>> <td class="nav">
>>        <s:url action="ActionEditSave" method="input" id="url">
>>                    <s:param name="fmrTenant.sSN" value="sSN"/>
>>                   <s:param name="fmrTenant.hshid" value="hshid"/>
>>        </s:url>
>>        <a href="<s:property value="#url"/>"><s:text
>> name="tenant.edit"/></a>
>> </td>
>>
>> hshid is int
>> sSN is string
>>
>> However, in the final URL the two parameters are separated by &amp;  This
>> should not be there.  Does anyone know how to avoid &amp;?
>>
>
>

Re: using multiple param in s:url tag

Posted by Bhaarat Sharma <bh...@gmail.com>.
according to documentation...if I try to use escapeAmp property in my s:url
tag then I get the following error...

Attribute escapeAmp invalid for tag url according to TLD

On Sat, Jun 20, 2009 at 7:16 PM, Bhaarat Sharma <bh...@gmail.com> wrote:

> Hello,
>
> I am using param tag inside s:url tag like the following
>
> <td class="nav">
>        <s:url action="ActionEditSave" method="input" id="url">
>                    <s:param name="fmrTenant.sSN" value="sSN"/>
>                   <s:param name="fmrTenant.hshid" value="hshid"/>
>        </s:url>
>        <a href="<s:property value="#url"/>"><s:text
> name="tenant.edit"/></a>
> </td>
>
> hshid is int
> sSN is string
>
> However, in the final URL the two parameters are separated by &amp;  This
> should not be there.  Does anyone know how to avoid &amp;?
>