The Common-Controls Tag Library Tag Reference Documentation

[ 1. Introduction ]

The Common-Controls form a Java™ presentation framework for J2EE™ web applications on the basis of Java™ Servlets, JavaServer Pages (JSP) and Apache Struts. The presentation framework contains the most common control elements as are required repeatedly for the development of J2EE™-applications with HTML-frontends.

[ 2. Requirements ]

For using the Common Controls tag library, the file common-controls-bin.jar must be added to the application classpath. To do so, the file merely has to be copied into the directory WEB-INF/lib.

[ 3. Usage ]

[ 3a. Usage with explicit registration (old) ]

The tag library must be included in the Deployment Descriptor (WEB-INF/web.xml) of the web application. For this, the following sections can be copied:


<taglib>       <taglib-uri>/WEB-INF/tlds/cc-controls.tld</taglib-uri>       <taglib-location>/WEB-INF/tlds/cc-controls.tld</taglib-location> </taglib>
<taglib>       <taglib-uri>/WEB-INF/tlds/cc-forms.tld</taglib-uri>       <taglib-location>/WEB-INF/tlds/cc-forms.tld</taglib-location> </taglib>
<taglib>       <taglib-uri>/WEB-INF/tlds/cc-menu.tld</taglib-uri>       <taglib-location>/WEB-INF/tlds/cc-menu.tld</taglib-location> </taglib>
<taglib>       <taglib-uri>/WEB-INF/tlds/cc-security.tld</taglib-uri>       <taglib-location>/WEB-INF/tlds/cc-security.tld</taglib-location> </taglib>
<taglib>       <taglib-uri>/WEB-INF/tlds/cc-svg.tld</taglib-uri>       <taglib-location>/WEB-INF/tlds/cc-svg.tld</taglib-location> </taglib>
<taglib>       <taglib-uri>/WEB-INF/tlds/cc-template.tld</taglib-uri>       <taglib-location>/WEB-INF/tlds/cc-template.tld</taglib-location> </taglib>
<taglib>       <taglib-uri>/WEB-INF/tlds/cc-utility.tld</taglib-uri>       <taglib-location>/WEB-INF/tlds/cc-utility.tld</taglib-location> </taglib>

Note: The relevant Tag Library Descriptor File *.tld must be saved in the subdirectory tlds in the WEB-INF directory.

Now, the tags of the Common Controls tag library can be used in the der JSP Page by including the following directives at the start of the page

<%@ taglib uri="/WEB-INF/tlds/cc-controls" prefix="ctrl" %>
<%@ taglib uri="/WEB-INF/tlds/cc-forms" prefix="forms" %>
<%@ taglib uri="/WEB-INF/tlds/cc-utility" prefix="util" %>
<%@ taglib uri="/WEB-INF/tlds/cc-menu" prefix="menu" %>
<%@ taglib uri="/WEB-INF/tlds/cc-base" prefix="base" %>
<%@ taglib uri="/WEB-INF/tlds/cc-template" prefix="template" %>
<%@ taglib uri="/WEB-INF/tlds/cc-svg" prefix="svg" %>
<%@ taglib uri="/WEB-INF/tlds/cc-security.tld" prefix="sec" %>

[ 3b. Usage with impliziter registration (new) ]

<%@ taglib prefix="ctrl" uri="" %>
<%@ taglib prefix="forms" uri="" %>
<%@ taglib prefix="util" uri="" %>
<%@ taglib prefix="menu" uri="" %>
<%@ taglib prefix="base" uri="" %>
<%@ taglib prefix="template" uri="" %>
<%@ taglib prefix="svg" uri="" %>
<%@ taglib prefix="sec" uri="" %>
This is possible for the Stuts tags, too.
<%@ taglib prefix="bean" uri="" %>
<%@ taglib prefix="html" uri="" %>
<%@ taglib prefix="logic" uri="" %>
<%@ taglib prefix="nested" uri="" %>
<%@ taglib prefix="tiles" uri="" %>