A JSP must import the ATG platform’s DSP tag library so it
access Nucleus components. The following page directive specifies the DSP tag
library location and the
dsp
prefix to use for its tags:<%@ taglib uri="http://www.atg.com/taglibs/daf/dspjspTaglib1_0"
prefix="dsp"%>
There are two ways to deploy a tag library. By default, the
DSP tag libraries
tld
files
are kept in the tag library JAR file inside WEBINF/lib
.
The URI used in JSP page directives are defined in the tld
itself.
The URI in the page directive must match the URI that is
specified in either the tag library’s
tld
file (as is the case with the DSP tag libraries) or web.xml
. In order to define a different
URI for the DSP tag libraries, specify the new URI and tld
file location in web.xml
. Then, the JSPs can use either
the default or the new URI.Anatomy of a JSP Looks Like:
<%@ taglib uri="http://www.atg.com/taglibs/daf/dspjspTaglib1_0" prefix="dsp" %>
<dsp:page>
<html>
<head>
<title>A Simple Test Page</title>
</head>
<body bgcolor="#ffffff">
<h1>A Simple Test Page</h1>
<<can use dsp: tags through out the JSP page>>
</body>
</html>
</dsp:page>
0 comments:
Post a Comment