Discussion:
Multiple matches with single <logic:match...>
sudhakar487248
2011-06-29 12:14:39 UTC
Permalink
is there any way to test more than one match at a time by using single struts
tag lib

<logic:match ....>

i mean

i have a string and i want to check that string is having either "ERROR:" or
"POPUP:"

like as follows

String str="example ERROR:"
str.contains("ERROR:") || str.contains("POPUP:")

--
View this message in context: http://struts.1045723.n5.nabble.com/Multiple-matches-with-single-logic-match-tp4534953p4534953.html
Sent from the Struts - User mailing list archive at Nabble.com.
Dave Newton
2011-06-29 15:17:48 UTC
Permalink
How about using JSTL? It's the recommended solution when both it and Struts
tags provide equivalent functionality, and it's arguably better than using
the antiquated Struts tags.

Dave
Post by sudhakar487248
is there any way to test more than one match at a time by using single struts
tag lib
<logic:match ....>
i mean
i have a string and i want to check that string is having either "ERROR:" or
"POPUP:"
like as follows
String str="example ERROR:"
str.contains("ERROR:") || str.contains("POPUP:")
--
http://struts.1045723.n5.nabble.com/Multiple-matches-with-single-logic-match-tp4534953p4534953.html
Post by sudhakar487248
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
Nick Broadhurst
2011-06-29 15:29:33 UTC
Permalink
"...antiquated Struts tags..." you're concerning me. That's all I use.
Post by Dave Newton
How about using JSTL? It's the recommended solution when both it and Struts
tags provide equivalent functionality, and it's arguably better than using
the antiquated Struts tags.
Dave
Post by sudhakar487248
is there any way to test more than one match at a time by using single
struts
Post by sudhakar487248
tag lib
<logic:match ....>
i mean
i have a string and i want to check that string is having either "ERROR:"
or
Post by sudhakar487248
"POPUP:"
like as follows
String str="example ERROR:"
str.contains("ERROR:") || str.contains("POPUP:")
--
http://struts.1045723.n5.nabble.com/Multiple-matches-with-single-logic-match-tp4534953p4534953.html
Post by sudhakar487248
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
Dave Newton
2011-06-29 15:34:46 UTC
Permalink
The Struts 1 documentation specifically recommends using JSTL when
functionality overlaps. JSTL didn't exist when the first iterations of S1
tags were developed :)

If you're using Struts 2 there's less of an advantage, but the OP is on S1.
I've tended to use S2 tags for most stuff in S2 apps.

Dave
"...antiquated Struts tags..." you're concerning me. That's all I use.
Post by Dave Newton
How about using JSTL? It's the recommended solution when both it and Struts
tags provide equivalent functionality, and it's arguably better than using
the antiquated Struts tags.
Dave
Post by sudhakar487248
is there any way to test more than one match at a time by using single
struts
Post by sudhakar487248
tag lib
<logic:match ....>
i mean
i have a string and i want to check that string is having either "ERROR:"
or
Post by sudhakar487248
"POPUP:"
like as follows
String str="example ERROR:"
str.contains("ERROR:") || str.contains("POPUP:")
--
http://struts.1045723.n5.nabble.com/Multiple-matches-with-single-logic-match-tp4534953p4534953.html
Post by Dave Newton
Post by sudhakar487248
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
Nick Broadhurst
2011-06-29 15:48:48 UTC
Permalink
I am using S2. No wonder I didn't remember using the <logic> tag recently
although it looked familiar. Haven't used S1 in a while. Probably should
become versed in JSTL though.
Post by Dave Newton
The Struts 1 documentation specifically recommends using JSTL when
functionality overlaps. JSTL didn't exist when the first iterations of S1
tags were developed :)
If you're using Struts 2 there's less of an advantage, but the OP is on S1.
I've tended to use S2 tags for most stuff in S2 apps.
Dave
"...antiquated Struts tags..." you're concerning me. That's all I use.
Post by Dave Newton
How about using JSTL? It's the recommended solution when both it and
Struts
Post by Dave Newton
tags provide equivalent functionality, and it's arguably better than
using
Post by Dave Newton
the antiquated Struts tags.
Dave
Post by sudhakar487248
is there any way to test more than one match at a time by using single
struts
Post by sudhakar487248
tag lib
<logic:match ....>
i mean
i have a string and i want to check that string is having either
"ERROR:"
Post by Dave Newton
or
Post by sudhakar487248
"POPUP:"
like as follows
String str="example ERROR:"
str.contains("ERROR:") || str.contains("POPUP:")
--
http://struts.1045723.n5.nabble.com/Multiple-matches-with-single-logic-match-tp4534953p4534953.html
Post by Dave Newton
Post by sudhakar487248
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
Loading...