This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts: logic tags on non-bean entities (Strings).

 
Karl Beowulph
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy. As usual, I figured out one problem only to run into another.

Is there anyway I can use "logic:equal" to compare two Strings in a .jsp page?

I'd like to use it to see if a parameter that I'm passing to a tile has a certain value.

I've been trying logic:equal paramater ="tiles:get name='myParamater'" value ="myTestValue", but that hasn't been working. I've also tried getAsString with the same results.

Anyone have any ideas? Is there a way I could use some inpage Java to solve this? (Since I can't assign anything dynamically, I don't really think so though).
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34084
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Karl,
You could use bean efine to get the first string in a bean.
 
Karl Beowulph
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the only solution then to actually create a bean for which to test? Methinks the logic tag could do with an upgrade.

Thanks for the response, I'll give that a try.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic