2

I don't understand this author: context, properties of the default or root object. ..based on a context

I'm stuck at reading this portion of the tutorial:

http://www.tutorialspoint.com/struts_2/struts_value_stack_ognl.htm

"The OGNL is very similar to the JSP Expression Language. OGNL is based on the idea of having a root or default object within the context. The properties of the default or root object can be referenced using the markup notation, which is the pound symbol. As mentioned earlier, OGNL is based on a context and Struts builds an ActionContext map for use with OGNL. The ActionContext map consists of the following:..."

What does author mean when he writes:

"idea of having a root or default object within the context."

"OGNL is based on a context"

..what is this context thing??

it's extremely frustrating.

Roman C
  • 49,761
  • 33
  • 66
  • 176
user3769040
  • 235
  • 4
  • 14

1 Answers1

1

Answering your questions in the following order:

OGNL has a context or context map on which it operates. Framework sets it to action context.

A root is a default object in the context map and all objects it contains could be referenced without #. Framework sets this object to value stack.

References:

Roman C
  • 49,761
  • 33
  • 66
  • 176
  • It doesn't explain the original question of what #2 and #1 mean in terms of what context is. I'm just as lost as a few days back. Please not mention the word context until it can be explained. – user3769040 Jul 09 '14 at 20:42
  • 1
    After going through a significant portion of the tutorial, I finally understand the above, but I think the author of the site did not need to write all the above in the introductory phase as it is very opaque. Could have written that in the conclusion area. Thanks Roman C. – user3769040 Jul 15 '14 at 20:49
  • Welcome, the checkbox is on the left of the answer. – Roman C Dec 17 '21 at 18:22