Loom includes a LoomServletRequest and LoomServletResponse classes that add some features to the standard HttpServletRequest and HttpServletResponse objects:
Loom will identify Ajax requests realized with prototype or jQuery (or any other framework that sets the X-Requested-With HTTP header) automatically and set a request attribute to be used:
JSP pages:
<c:if test="${!ajax}">
<!-- ...code to execute when the request was not launched using XHR -->
</c:if>
Java code:
if (request.isAjax()) {
// whatever...
}