What is action context in Struts 2

怎甘沉沦 提交于 2019-12-25 04:24:13

问题


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:


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:

  • OGNL
  • OGNL Basics


来源:https://stackoverflow.com/questions/24639743/what-is-action-context-in-struts-2

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!