You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by piltrafeta <pi...@gmail.com> on 2008/08/22 14:33:56 UTC
s:if comparing a string
Hello,
in m'y jsp i'm trying to compare a String link this
<s:if test="#session.request._status != 'T' ">
but is not working, does anybody knows the sintaxis?
Thanks
--
View this message in context: http://www.nabble.com/s%3Aif-comparing-a-string-tp19106286p19106286.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: s:if comparing a string
Posted by Nils-Helge Garli Hegvik <ni...@gmail.com>.
What are you trying to compare with? A value in the session, or a
value in the request? Or do you actually have an object named request
with a _status property in the session?
Maybe these resources can help:
http://struts.apache.org/2.x/docs/tag-syntax.html
http://struts.apache.org/2.x/docs/ognl.html
Nils-H
On Fri, Aug 22, 2008 at 2:33 PM, piltrafeta <pi...@gmail.com> wrote:
>
> Hello,
> in m'y jsp i'm trying to compare a String link this
>
> <s:if test="#session.request._status != 'T' ">
>
> but is not working, does anybody knows the sintaxis?
>
> Thanks
> --
> View this message in context: http://www.nabble.com/s%3Aif-comparing-a-string-tp19106286p19106286.html
> Sent from the Struts - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: s:if comparing a string
Posted by piltrafeta <pi...@gmail.com>.
Thanks you all guys !
I was trying to compare a String so using single cuotes solved my problem.
<s:if test='#session.request._status != "T" '>
Thanks again!!!
piltrafeta wrote:
>
> Hello,
> in m'y jsp i'm trying to compare a String link this
>
> <s:if test="#session.request._status != 'T' ">
>
> but is not working, does anybody knows the sintaxis?
>
> Thanks
>
--
View this message in context: http://www.nabble.com/s%3Aif-comparing-a-string-tp19106286p19107093.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: s:if comparing a string
Posted by Dave Newton <ne...@yahoo.com>.
--- On Fri, 8/22/08, piltrafeta wrote:
> in m'y jsp i'm trying to compare a String link this
>
> <s:if test="#session.request._status != 'T' ">
<s:if test='#session.request._status != "T" '>
Using single quotes around a single character will create a char, not a string, like in Java.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
RE: if comparing a string
Posted by ravindra <ra...@btpsoft.com>.
Where is your _status property? Is it in session or request or as a property
in your action class? And what is the data type of your _status field?
If it is in your session the below one will work
<s:if test="#session._status != 'T'">
If it is in your action class as property having getter and setter, the
below one will work
<s:if test="%{_status != 'T'}">
All the best.
-----Original Message-----
From: piltrafeta [mailto:piltrafeta@gmail.com]
Sent: Friday, August 22, 2008 6:04 PM
To: user@struts.apache.org
Subject: s:if comparing a string
Hello,
in m'y jsp i'm trying to compare a String link this
<s:if test="#session.request._status != 'T' ">
but is not working, does anybody knows the sintaxis?
Thanks
--
View this message in context:
http://www.nabble.com/s%3Aif-comparing-a-string-tp19106286p19106286.html
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org