Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Help needed for Struts' logic:equal

 
Ranch Hand
Posts: 193
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does anyone know how to use Struts' <logic:equal> tag or a link for the examples of using it?
I'm doing something like following:
<jsp:useBean id="myForm" scope="session" class="com.MyForm" />
...

<logic:equal name="myForm" property="myProperty" value="myValue" >
<bean:message key="label.myLabel" />:
</logic:equal >
myForm is an instance of MyForm bean, and myProperty is one of its properties.
When myProperty equals to myValue, the message pointed by label.myLabel in the
message resource should be printed.
When I ran the above code I got following error: No-matching extension tags
Could someone help me? Thanks.
 
Ranch Hand
Posts: 567
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I don't recognise the error, and your logic tag seems to be OK. It looks like the error is coming from something else.
It seems strange that you are instantiating your form bean in your jsp with the useBean tag. Why don't you declare the form bean in struts-config.xml?
Otherwise, how are you sure that this error comes from the logic tag? Post the first couple of lines of the stack trace, or at least the classes that are causing the crash.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've seen that message a couple of times and pulled my hair out trying to figure out what was wrong with my tags, when it actually was a problem from above the stated non-matched tag. In my case, it has usually been a missed quotation mark. Eg:
<html:text property="text1 /> <--Missed quote here
<html:select property="select1" />
<html ption value="1">1</html ption>
</html:select>
This may give an error like: "Non-matching tags: '</html:select>'", when the problem is actually that I missed a quote above, it ruined my opening html:select tag, and now my end tag is lonely. Also look for missed >.
 
The two armies met. But instead of battle, they decided to eat some pie and contemplate this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!