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.
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
.
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-base.tld</taglib-uri> <taglib-location>/WEB-INF/tlds/cc-base.tld</taglib-location> </taglib>
<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" %> |
<%@ taglib prefix="ctrl" | uri="http://www.common-controls.com/cc/tags-ctrl" %> |
<%@ taglib prefix="forms" | uri="http://www.common-controls.com/cc/tags-forms" %> |
<%@ taglib prefix="util" | uri="http://www.common-controls.com/cc/tags-util" %> |
<%@ taglib prefix="menu" | uri="http://www.common-controls.com/cc/tags-menu" %> |
<%@ taglib prefix="base" | uri="http://www.common-controls.com/cc/tags-base" %> |
<%@ taglib prefix="template" | uri="http://www.common-controls.com/cc/tags-template" %> |
<%@ taglib prefix="svg" | uri="http://www.common-controls.com/cc/tags-svg" %> |
<%@ taglib prefix="sec" | uri="http://www.common-controls.com/cc/tags-sec" %> |
This is possible for the Stuts tags, too. | |
<%@ taglib prefix="bean" | uri="http://jakarta.apache.org/struts/tags-bean" %> |
<%@ taglib prefix="html" | uri="http://jakarta.apache.org/struts/tags-html" %> |
<%@ taglib prefix="logic" | uri="http://jakarta.apache.org/struts/tags-logic" %> |
<%@ taglib prefix="nested" | uri="http://jakarta.apache.org/struts/tags-nested" %> |
<%@ taglib prefix="tiles" | uri="http://jakarta.apache.org/struts/tags-tiles" %> |