Hibtags

JSP 1.2 tag library for Hibernate 2.1

Example 1

This queries for Cat object for anyone whose name starts with Fritz. The results is put as a page context attribute (by default) named cats as a List of Cat objects.

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

<hib:find var="cats">
  from Cat c
 where c.name like 'Fritz%'
</hib:find>

<%-- Prints the name of the first cat we found. --%>
<c:out value="${cats[0].name}" />

Uses:

<hib:find>

Home
Examples
Documentation
Mailing list
Download
About Us
License
CVS
SF page





SourceForge.net Is Down