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="f8ed96aabbcadda8-6de30fb4-4c974be0-b7c9a7f1-419f558e4f4e4a8a2ee8397e"><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="b64165c28ffd8270-d8628c43-41994eee-a23bb805-63da3d0c65f83b6c07b7e7a4"><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="618d954eff85fc19-364eb961-4c774d32-9094a695-3b8ef43af22513d1e7b3591b"><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="b5da286afa1eb361-a8b8d1b1-4c8c4bff-8af9b8c6-be460f9a58a8f81d7454f6fa"><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="b7f41f10624e2406-42732903-4a1d4730-9cd1beb6-a286a1dea5dab597e1807be7"><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="337bd62082c92e56-0bf0509e-483d4117-b449be9d-bb03da2546e0afc91289107e"><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="a3226a12a04c993f-17dd8245-4c894d91-97f2b21f-2d4dd8b98ef37bc688e5ae67"><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="ac0ad0e3ac9147e6-a937c6af-415a4dee-9a229994-c4532218ca3af91438dd1e56"><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="48214473d3291492-47e1b5cc-456244ed-bbf180d6-888b44a8e7c6a63f75823bc4"><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>