Jena, com.hp.hpl.jena.query.ResultSet List<RowObject>, RowObject - , , HTML. List<RowObject> JSP.
List<RowObject> results = getItSomeHow();
request.setAttribute("results", results);
request.getRequestDispatcher("page.jsp").forward(request, response);
JSP JSTL c:forEach, List<RowObject>, HTML.
<table>
<c:forEach items="${results}" var="rowObject">
<tr>
<td>${rowObject.someProperty}</td>
<td>${rowObject.anotherProperty}</td>
...
</tr>
</c:forEach>
</table>
, , List<RowObject> Jena ResultSet:
List<RowObject> results = new ArrayList<RowObject>();
while (rs.hasNext()) {
RowObject result = new RowObject();
QuerySolution binding = result.nextSolution();
result.setInd(binding.get("ind"));
result.setSomethingElse(binding.get("something_else"));
results.add(result);
}
:
...
<td>${rowObject.ind}</td>
<td>${rowObject.somethingElse}</td>
...