• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2 Query using OGNL for displaying data

 
PavanPL KalyanK
Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



(I have not included the full jsp page )

My query is why # is used in some cases and in some cases # is not used .Please explain .
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The "#" character is used when an action context variable is created, for example by an <s:set>, <s:url>, or similar tag. No "#" character is needed when referencing objects on the stack itself. I think of the action context in two ways: the value stack, and another scope (like session or request scopes, but different).

When accessing the action context "scoped" variables we need to use "#", when accessing things on the stack, we don't.
 
PavanPL KalyanK
Ranch Hand
Posts: 212
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for excellent answer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic