4.2 The Host bundle
Prev | 4. A Sample Application | Next

## 4.2 The Host bundle

This bundle is very simple with no Java code. It defines the Snaps filter in its `web.xml` just as we have seen in the Using Snaps section. The menu bar uses the taglibs support to render links for each registered Snap.

    <ul>
        <li><a href="<c:url value="/"/>">Home</a></li>
        <snaps:snaps var="snaps">
            <c:forEach var="snap" items="${snaps}">
                <c:if test="${snap.contextPath ne '/styles'}">
                    <li><a href="<c:url value="${snap.contextPath}${snap.properties['link.path']}"/>">
                        ${snap.properties['link.text']}</a>
                    </li>
                </c:if>
            </c:forEach>
        </snaps:snaps>
    </ul>

This is very similar to an example we have already seen. It puts the links in a list and adds a link at the beginning to return to the host. The properties it is referencing are located in the Snaps themselves at `/META-INF/snap.properties`.

Prev | Up | Next
4. A Sample Application | Home | 4.3 Adding New Content