The following piece of JSTL code displays all request parameters on the page,
except for check-boxes and radio-buttons. They require the use of the paramValues implicit object.
<c:forEach items="${param}" var="par">
Parameter Name/Value : <c:out value="${par.key} - ${par.value}"/>
</c:forEach>
To display session and request objects, use the following code:
<c:forEach items="${sessionScope}" var="par">
The following code can be used to paginate database query results using JSTL.
The select statement results are stored in the queryResults variable. Here is the paginator code:
<c:set var="totalCount" scope="session" value="${queryResults.rowCount}"/>
<c:set var="perPage" scope="session" value="20"/>
<c:set var="totalPages" scope="session" value="${totalCount/perPage}"/>
<c:set var="pageIndex" scope="session" value="${param.start/perPage+1}"/>