RoleList.jsp

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<%@taglib uri="http://www.springframework.org/tags/form" prefix="sf"%>

<%@taglib uri="http://www.springframework.org/tags" prefix="s"%>

<%@ page isELIgnored="false"%>

<h1>Role List</h1>

<h2 style="color: green">${success}</h2>

<c:url var="editUrl" value="/ctl/Role?id=" />

<sf:form action="search" commandName="form" method="post">

<sf:hidden path="pageNo" />

<sf:hidden path="pageSize" />

<s:message code="label.name" />

<sf:input path="roleName" />

<input type="submit" value="Search" name="operation">

<table border="1">

<c:if test="${!empty list}">

<tr>

<th><input type="checkbox" /></th>

<th>ID</th>

<th><s:message code="label.name" /></th>

<th><s:message code="label.description" /></th>

</tr>

<c:forEach items="${list}" var="role" varStatus="ct">

<tr>

<td><input type="checkbox" name="ids" value="${role.id}"></td>

<td><c:out

value="${(form.pageSize * (form.pageNo-1))+ct.index+1}" /></td>

<td><c:out value="${role.roleName}" /></td>

<td><c:out value="${role.roleDescription}" /></td>

<td><a href="${editUrl}${role.id}">Edit</a></td>

</tr>

</c:forEach>

<tr>

<td align="left"><input type="submit" value="Previous"

name="operation"></td>

<td align="center" colspan="3"><a

href="<c:url value="/ctl/Role" />">New</a> <input type="submit"

value="Delete" name="operation">&nbsp;</td>

<td align="right"><input type="submit" value="Next"

name="operation"></td>

</tr>

</c:if>

</table>

</sf:form>