[opencms-dev] taglib tag in web.xml

Christoph Schönfeld cschoenfeld at sylphen.com
Wed Apr 18 21:08:38 CEST 2007


No, the taglib uri can be just any identifier you choose. The taglib 
element defines the value of the taglib directive you include in your 
JSP files.

<%@taglib prefix="cms" uri="http://www.opencms.org/taglib/cms"%>

When the JSP engine finds such a reference and has previously read the 
web.xml it knows which taglib to choose.

The mechanism of making a taglib known to the servlet engine via web.xml 
is outdated as of version 2.4 of the Java Servlets specification. It 
defines that compliant containers discover TLD files automatically. 
Please refer to the specification for these locations. (If I remember 
correctly they are META-INF/*.tld, WEB-INF/*.tld and 
WEB-INF/*.jar:/META-INF/*.tld).

OpenCms however still uses the old DTD based web.xml schema of Java 
Servlets 2.3 and requires the taglib definition in web.xml.

Best regards,
Christoph



More information about the opencms-dev mailing list