| Section 11 |
|---|
| 11.1 Identify properly formatted tag library declarations in the Web application deployment descriptor. |
| 11.2 Identify properly formatted taglib directives in a JSP page. |
11.3 Given a custom tag library, identify properly formatted custom tag usage in a JSP page. Uses include:
|
11.1 Identify properly formatted tag library declarations in the Web application deployment descriptor.
taglib*, <!ELEMENT taglib (taglib-uri, taglib-location)> <web-app> <taglib> <taglib-uri> http://www.jspinsider.com/jspkit/javascript </taglib-uri> <taglib-location> /WEB-INF/JavaScriptExampleTag.tld </taglib-location> </taglib> </web-app>
11.2 Identify properly formatted taglib directives in a JSP page.
<%@ taglib uri="http://jakarta.apache.org/taglibs/datetime-1.0" prefix="dt" %> - uri can be defined in web.xml or can be directly pointing to the TLD. - prefix is used in the jsp to reference the tag. ( local namespace)
11.3 Given a custom tag library, identify properly formatted custom tag usage in a JSP page. Uses include:
An empty custom tag - <msgBean:message/> A custom tag with attributes - <msgBean:message attrName="value" /> A custom tag that surrounds other JSP code <msgBean:message> <h1>This is the title</h1> </msgBean:message> Nested custom tags <msgBean:message> <helloBean:sayHello/> </msgBean:message>