• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Dynamic identifier in the Struts if-condition

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have an action class setting some values in the Struts' session map as true or false.



In a jsp I want to check the according session attribute and display an optional element or not. The jsp-command is here:


Since this command does not work and I am not very good in the OGNL I want to know how I can assemble the dynamic identifier in the if-condition and check the session attributes for it. Maybe you can help me.
 
Bugra Derre
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Okay,

I resolved this issue. I changed the code to following:



and the jsp to



And now it works.

Bugra Derre wrote:Hi,

I have an action class setting some values in the Struts' session map as true or false.



In a jsp I want to check the according session attribute and display an optional element or not. The jsp-command is here:


Since this command does not work and I am not very good in the OGNL I want to know how I can assemble the dynamic identifier in the if-condition and check the session attributes for it. Maybe you can help me.

 
Of course, I found a very beautiful couch. Definitely. And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic