What is action context in Struts 2

2019-08-28 21:58发布

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.

1条回答
做个烂人
2楼-- · 2019-08-28 22:15

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:

查看更多
登录 后发表回答