The easiest way is to use JSTL-EL to filter the response. I usually use something like this to wrap my table creation code:
<c:if test="${not empty resultSet}">
... table creation code ...
</c:if>
…where “resultSet” refers to whatever data bean variable you have defined.
You could also add another statement that tests the alternative condition (i.e. the data set IS empty), and provide a message to the user stating “No rows returned.” or equivalent is you like.
Regards,
-Rod