Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

bean tag problem

 
shukla raghav
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • 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



 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please see ItDoesntWorkIsUseless and TellTheDetails.

And this.
 
shukla raghav
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • 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
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic