How to use the Trail-Taglib

The trail taglib mainly comes down to two tags. The first is used to add a page into the trail, and the other is used to to list the current trail.

For example:

< %@ taglib prefix="trail" uri="http://www.osjava.org/taglibs/trail-1.0" % >

< trail:push label="List Categories"/ >

< trail:list delimiter=" - & gt; "/ >

The push tag has an optional attribute named url which will override the url stored in the trail, but hopefully this will rarely be needed.

The list tag has an optional attribute named type which specifies the type of list to create. By default the list will be normalized , but you can specify full to see the user ' s entire trail.

Advanced usage

The trail is stored in an org.osjava.taglib.trail.BreadCrumbs object under the session variable org.osjava.taglib.breadcrumbs .

Pre-Servlet 2.4

I have been using this taglib in a 2.4 container and make use of new features to know when forwarding has occured. However the following filter, if filters are available in your container, will emulate these forwarding features:

< filter >

< filter-name > trailFilter < filter-name >

< filter-class > org.osjava.taglib.trail.OriginalRequestFilter < filter-class >

< filter >

< filter-mapping >

< filter-name > trailFilter < filter-name >

< url-pattern > *.do < url-pattern >

< filter-mapping >