Different OGNL syntax

<s:property value="user.name"/>
Here user.name is an OGNL expression which first locates user object on the values stack object in the ActionContext. then it will fetch the name property of the user object.

<s:property value="array[0]"/>
It will display oth element of array

<s:property value="array.length"/>
It will display length of array

<s:property value="arrayList[0]"/>
It will display oth element of arrayList

<s:property value="arrayList.size"/>
It will display size of arrayList

<s:property value="#session['bird.name']"/>
Here OGNL will first find the session object into the ActionContext then it will locate the bird object into session map and then it will fetch name property of that bird object.
# is used to locate particular object on the ActionContext. without # it wil by default try to find data into ValueStack.

<s:property value="${expression}"/>
To force a string attribute to be interpreted as an OGNL expression you can use the %{expression} syntax.

<s:property value="student.father.mother.name"/>
this is also called chain properties.

Here it will get the value of student's father's mother name.

Setting Value using OGNL
<s:form action="Register">
<s:textfield name="firstName" label="firstName"/>
<s:textfield name="lastName" label="lastName"/>
<s:submit/>
</s:form>

Here the text inside name fields (i.e 'firstname', 'lastName') is OGNL. 
we are setting value in the firstName and lastName using OGNL.

GettingValue using OGNL
<s:property value="firstName"/>

Here we are getting value of firstName using OGNL. here text inside the value field (i.e 'firstName' ) is OGNL.