<%@page language="java" session="true" pageEncoding="ISO-8859-1"%>
<%@taglib uri="/struts-tags"  prefix="s"%>
<html>
<head>
<title>Example_OGNL_Struts2</title>
</head>
<body >
<h1></h1>
<table><tr>
<td align="center" valign="top" bgcolor="#CCCCFF">
<br>Select Student Name and Age....
<s:actionerror/>
<s:form action="ognlAction">
<s:select list="{'Bharat','Gyan','Ankit','Vinay'}" 
label="Name" headerKey="none" headerValue="None" 
name="studentname"/>
<s:textfield label="Age" name="age"></s:textfield>
<s:submit></s:submit>
</s:form>
</td>
<td align="center" valign="top">
|Accessing Bean Properties |
<table cellpadding="2" cellspacing="0" width="200">
<tr bgcolor="#CC66FF"> <td>Student name</td> <td>Age</td></tr>
<tr>
<td><s:property value="studentname"/></td>
<td><s:property value="age"/>
</td></tr>
</table>
</td>
<td align="center" valign="top">
|Accessing Request |
<table cellpadding="2" cellspacing="0" width="200">
<tr bgcolor="#CC66FF">
<td>Student Name</td> <td>Age</td>
</tr>
<tr>
<td><s:property value="#request['bean'].studentname"/></td>
<td><s:property value="#request['bean'].age"/>
</td></tr>
</table>
</td>
</tr>
</table>
</body>
</html>