Dashboard > LAMS 2 > ... > Best Practices > Tag Library Definitions
  LAMS 2 Log In | Sign Up   View a printable version of the current page.  
  Tag Library Definitions
Added by Fiona Malikoff , last edited by Fiona Malikoff on Feb 24, 2006  (view change)
Labels: 
(None)

The following is the standard tag library definitions that should be included in your web.xml. It is best to include them taglibs.xml in your xdoclet merge directory, and allow XDoclet to include them in your web.xml.

These all use the "short name for the uri" convention, including the JSTL tags. Some people prefer using the public location of the taglib (e.g. http://java.sun.com/java/jstl/core-rt/) in case the web.xml is missing the taglib entry. This makes the system more reliable when it will always have web access.

However we can't guarantee that LAMS will always have access to the web and we want to find instances where it would break sooner rather than later. Using the public location will hide potential problems.

The two entries for tags-permittedTaglib, tags-scriptfree should only be added if you want this functionality. Most of LAMS is not using these entries. However they are found in lams-central so that you can copy them if you want.

The tld's can also be copied from lams-central to your project. Please ensure that you keep the paths (under WEB-INF) the same.

In your JSP files, please refer to the taglibs via the taglib-uri. This makes it easier to move the taglib to another location in the future.

Good <%@ taglib uri="tags-lams" prefix="lams" %>
Bad <%@ taglib uri="/WEBINF/lams.tld" prefix="lams" %>

See also LAMS Custom Tags and FCKeditor Integration With Tool.

Powered by a free Atlassian Confluence Open Source Project License granted to Learning Activity Management System (LAMS). Evaluate Confluence today.
Powered by Atlassian Confluence 2.7.3, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators