Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

ognl expression

description

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="034c8b986e050090-d0b70ac9-4f3f46ad-8b908bb1-b37fd02755d9e90f946b6fc6"><ac:plain-text-body><![CDATA[

[0].top

would get the top of the stack cut starting from element 0 in the stack (similar to top in this case)

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="48d461ee9b0b9595-ce4956a4-48384dc1-ad7dafc1-bff9f6d0e39b7b336dfbdccb"><ac:plain-text-body><![CDATA[

[1].top

would get the top of the stack cut starting from element 1 in the stack]]></ac:plain-text-body></ac:structured-macro>

...

Old Expression

New Expression

foo/blah

foo.blah

foo/someMethod()

foo.someMethod()

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="bd2da3bafc32d24f-1a35ad67-40a54295-a668a813-4129c49a7c43d9f86de4cf07"><ac:plain-text-body><![CDATA[

../bar/blah

[1].bar.blah

]]></ac:plain-text-body></ac:structured-macro>

@baz

not directly supported, but #baz is similar

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="1a595838c59c11bb-8dbbc4d2-449a4116-a1d1ad9a-0f9f112172f5b63caa228f65"><ac:plain-text-body><![CDATA[

.

top or [0]

]]></ac:plain-text-body></ac:structured-macro>

...

Struts 2 Named Objects

Struts 2 places request parameters and request, session, and application attributes on the OGNL stack. They may be accessed as shown below.

name

value

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="70c2fce2d4f56bcd-ee76fe87-49ac44df-899fac7c-eb43a4ade49b3100e1e12acb"><ac:plain-text-body><![CDATA[

#parameters['foo'] or #parameters.foo

request parameter ['foo'] (request.getParameter())

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="b36d0790d38ff175-84a091be-4f624883-827c87f3-56f4ee826b2e1738fa2313f5"><ac:plain-text-body><![CDATA[

#request['foo'] or #request.foo

request attribute ['foo'] (request.getAttribute())

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7c2a19cd6856fbe1-4eed6b97-4fac418f-a7c6bf01-78b6d591185ba0655d85ad1d"><ac:plain-text-body><![CDATA[

#session['foo'] or #session.foo

session attribute 'foo'

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="8268724fac50ef96-ce69001d-4f024f34-bcb3b9b7-5d226de60c69fee2329dc784"><ac:plain-text-body><![CDATA[

#application['foo'] or #application.foo

ServletContext attributes 'foo'

]]></ac:plain-text-body></ac:structured-macro>

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c13c0206cb957cad-b7a1f2c2-40e24810-8e0596b4-3d22563713ece2b072c4f55a"><ac:plain-text-body><![CDATA[

#attr['foo'] or #attr.foo

Access to PageContext if available, otherwise searches request/session/application respectively

]]></ac:plain-text-body></ac:structured-macro>