• 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

bean tag problem

 
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i dont know why the folowing bean tag is not working

struts.xml



DoBeanTags.jsp



BeanTestAction.java



DoBean.jsp



SelectBean.java



 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please see ItDoesntWorkIsUseless and TellTheDetails.

And this.
 
shukla raghav
Ranch Hand
Posts: 208
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First all ! Mistake Accepted, i am really sorry for not framing my question properly.

Expected Output : Display the value of property itm i.e. Washing Machine from the SelectBean class. in DoBean.jsp
Actual Output : blank screen

The link that you ahve sent is very useful i thnk i have got my answer.OGNL is a bit confusing sometimes when it comes to retrieving values.

Every time i am adviced, for my mistakes, using such wonderful links i am amazed to see such an organized functioning of java ranch. Great Work !!! It is to Java Programmers what Google is to general public.
 
David Newton
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Glad you figured it out :)

In this case it isn't really OGNL itself that's the issue, but the lack of consistency in S2 regarding when to use the OGNL escape %{} and when it's implied. In this case, it's implied, but not necessarily obvious... Most S2 developers seem to prefer *always* using the OGNL escape--it makes things easier to understand.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic