You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Abhinav (Cognizant)" <Ab...@cal.cognizant.com> on 2003/05/27 06:43:08 UTC

logic:match

In a form bean, I have two attributes say name1 and name2.

I have to use logic:match to check whether these two are same or not.

I found that "value" part of the taglib accepts constants or <%=expr%>

So, name2 is taken separately.

Any way to compare two properties simultaneously.

Thanx

 
 

Re: logic:match

Posted by Mark Lowe <ma...@talk21.com>.
i think there are various options to do this in the jsp, but I 
personally wouldn't.

Action servlets are really good and kinda fundamental to the whole 
struts approach, I wouldn't have any of this in the jsp.

String one = myForm.get("name1").toString().trim();
String two = myFom.get("name2").toString().trim();

if(one.equals(two)) {
	
}

On Tuesday, May 27, 2003, at 08:41 Europe/Rome, Franck POCHET wrote:

> Hello,
>
> the <%exp%> could be a scriptlet like
> <%yourBean.getProperty()%>
>
> regards
> --- "Abhinav (Cognizant)" <Ab...@cal.cognizant.com>
> wrote:
>> In a form bean, I have two attributes say name1 and
>> name2.
>>
>> I have to use logic:match to check whether these two
>> are same or not.
>>
>> I found that "value" part of the taglib accepts
>> constants or <%=expr%>
>>
>> So, name2 is taken separately.
>>
>> Any way to compare two properties simultaneously.
>>
>> Thanx
>>
>>
>>
>>> ****** Message from InterScan E-Mail VirusWall NT
>> ******
>>
>> ** No virus found in attached file noname.htm
>> ** No virus found in attached file noname.htm
>>
>> No Virus detected in the attached file(s).
>> *****************     End of message
>> ***************
>>
>>
>>> This e-mail and any files transmitted with it are
>> for the sole use of the intended
>> recipient(s) and may contain confidential and
>> privileged information. If you are not the
>> intended recipient, please contact the sender by
>> reply e-mail and destroy all copies of
>> the original message.
>> Any unauthorised review, use, disclosure,
>> dissemination, forwarding, printing or copying
>> of this email or any action taken in reliance on
>> this e-mail is strictly prohibited and
>> may be unlawful.
>>
>>           Visit us at http://www.cognizant.com
>>
>>>
> ---------------------------------------------------------------------
>> To unsubscribe, e-mail:
>> struts-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail:
> struts-user-help@jakarta.apache.org
>
>
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Search - Faster. Easier. Bingo.
> http://search.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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


Re: logic:match

Posted by Franck POCHET <fr...@yahoo.com>.
Hello,

the <%exp%> could be a scriptlet like
<%yourBean.getProperty()%>

regards
--- "Abhinav (Cognizant)" <Ab...@cal.cognizant.com>
wrote:
> In a form bean, I have two attributes say name1 and
> name2.
> 
> I have to use logic:match to check whether these two
> are same or not.
> 
> I found that "value" part of the taglib accepts
> constants or <%=expr%>
> 
> So, name2 is taken separately.
> 
> Any way to compare two properties simultaneously.
> 
> Thanx
> 
>  
>  
> > ****** Message from InterScan E-Mail VirusWall NT
> ******
> 
> ** No virus found in attached file noname.htm
> ** No virus found in attached file noname.htm
> 
> No Virus detected in the attached file(s).
> *****************     End of message    
> ***************
> 
> 
> > This e-mail and any files transmitted with it are
> for the sole use of the intended 
> recipient(s) and may contain confidential and
> privileged information. If you are not the 
> intended recipient, please contact the sender by
> reply e-mail and destroy all copies of 
> the original message. 
> Any unauthorised review, use, disclosure,
> dissemination, forwarding, printing or copying 
> of this email or any action taken in reliance on
> this e-mail is strictly prohibited and 
> may be unlawful.
> 
>           Visit us at http://www.cognizant.com
> 
> >
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
struts-user-help@jakarta.apache.org


__________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

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