File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts2 Query  using OGNL for displaying data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 Query  using OGNL for displaying data " Watch "Struts2 Query  using OGNL for displaying data " New topic
Author

Struts2 Query using OGNL for displaying data

PavanPL KalyanK
Ranch Hand

Joined: Feb 28, 2009
Posts: 212



(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

Joined: Sep 29, 2008
Posts: 12617

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

Joined: Feb 28, 2009
Posts: 212
Thanks for excellent answer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts2 Query using OGNL for displaying data