To use the tags, you need to do the following:
- Place the layout.jar file in the classpath of your project.
- Create a tld file that refers to the tags and place it in the WEB-INF directory of your web
application. A tld file called layout.tld for JSP version 1.1 is found in the project download.
You can use that one or write your own. Future releases will contain a sample tld file for
JSP version 1.2.
- Create an entry in your web.xml file that refers to the tld file, as per the JSP specs. It
should be similar to the following:
<taglib>
<taglib-uri>/WEB-INF/layout.tld</taglib-uri>
<taglib-location>/WEB-INF/layout.tld</taglib-location>
</taglib>
- At the top of each JSP page that will use the Layout Tag Library custom tags, add a line
declaring the Layout Tag Library like this:
<@ taglib uri="/WEB-INF/layout.tld" prefix="layout" %>
- To control the logging level of the library, place an appropriate log4j.properties files in
WEB-INF/classes .
|