You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Craftyman <cr...@gmail.com> on 2008/12/03 16:59:12 UTC

S:If test with percent car

Hi,

I would like to check if my unit equal to percent cahr (%) to replace it by
%25 in my url in order to allow to get this value during the auto decoding
url by my browser.
In use the folling code :

<s:if test="%{unit} == '%'>
 // Special code here to replace % by %2( in my url
</s:if>

But it does not run; percent char is not check correctly

I have try other kind of syntaxe witout more success.

Any idea ?

Regards

Cédric

Re: S:If test with percent car

Posted by Craftyman <cr...@gmail.com>.
Thanks for your quick answer

2008/12/3 Dave Newton <ne...@yahoo.com>

>
> http://struts.apache.org/2.x/docs/why-wont-the-if-tag-evaluate-a-one-char-string.html
>
>
> --- On Wed, 12/3/08, Craftyman <cr...@gmail.com> wrote:
>
> > From: Craftyman <cr...@gmail.com>
> > Subject: S:If test with percent car
> > To: "Struts Users Mailing List" <us...@struts.apache.org>
> > Date: Wednesday, December 3, 2008, 10:59 AM
> > Hi,
> >
> > I would like to check if my unit equal to percent cahr (%)
> > to replace it by
> > %25 in my url in order to allow to get this value during
> > the auto decoding
> > url by my browser.
> > In use the folling code :
> >
> > <s:if test="%{unit} == '%'>
> >  // Special code here to replace % by %2( in my url
> > </s:if>
> >
> > But it does not run; percent char is not check correctly
> >
> > I have try other kind of syntaxe witout more success.
> >
> > Any idea ?
> >
> > Regards
> >
> > Cédric
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

RE: S:If test with percent car

Posted by Jishnu Viswanath <ji...@tavant.com>.
Or try .equals also

Regards,

Jishnu Viswanath

Software Engineer

*(+9180)41190300 - 222(Ext) ll * ( + 91 ) 9731209330ll

Tavant Technologies Inc.,

www.tavant.com

PEOPLE :: PASSION :: EXCELLENCE


-----Original Message-----
From: Dave Newton [mailto:newton.dave@yahoo.com] 
Sent: Wednesday, December 03, 2008 9:44 PM
To: Struts Users Mailing List
Subject: Re: S:If test with percent car

http://struts.apache.org/2.x/docs/why-wont-the-if-tag-evaluate-a-one-char-string.html


--- On Wed, 12/3/08, Craftyman <cr...@gmail.com> wrote:

> From: Craftyman <cr...@gmail.com>
> Subject: S:If test with percent car
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Date: Wednesday, December 3, 2008, 10:59 AM
> Hi,
> 
> I would like to check if my unit equal to percent cahr (%)
> to replace it by
> %25 in my url in order to allow to get this value during
> the auto decoding
> url by my browser.
> In use the folling code :
> 
> <s:if test="%{unit} == '%'>
>  // Special code here to replace % by %2( in my url
> </s:if>
> 
> But it does not run; percent char is not check correctly
> 
> I have try other kind of syntaxe witout more success.
> 
> Any idea ?
> 
> Regards
> 
> Cédric

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

Any comments or statements made in this email are not necessarily those of Tavant Technologies.
The information transmitted is intended only for the person or entity to which it is addressed and may 
contain confidential and/or privileged material. If you have received this in error, please contact the 
sender and delete the material from any computer. All e-mails sent from or to Tavant Technologies 
may be subject to our monitoring procedures.


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


Re: S:If test with percent car

Posted by Dave Newton <ne...@yahoo.com>.
http://struts.apache.org/2.x/docs/why-wont-the-if-tag-evaluate-a-one-char-string.html


--- On Wed, 12/3/08, Craftyman <cr...@gmail.com> wrote:

> From: Craftyman <cr...@gmail.com>
> Subject: S:If test with percent car
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Date: Wednesday, December 3, 2008, 10:59 AM
> Hi,
> 
> I would like to check if my unit equal to percent cahr (%)
> to replace it by
> %25 in my url in order to allow to get this value during
> the auto decoding
> url by my browser.
> In use the folling code :
> 
> <s:if test="%{unit} == '%'>
>  // Special code here to replace % by %2( in my url
> </s:if>
> 
> But it does not run; percent char is not check correctly
> 
> I have try other kind of syntaxe witout more success.
> 
> Any idea ?
> 
> Regards
> 
> Cédric

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