Sun XML and JSP Tutorial Help (Custom Tags)
843835Dec 26 2002 — edited Dec 27 2002I am trying to learn how to use XML with JSP. I have gone to the tutorial pages to read up on this and try the Sun examples. I create my own XML document and make the changes in the tutorial's example to accomodate for my XML document but the tutorial uses a custom tag library. Here is the example I'm talking about:
<%@ taglib uri="..." prefix="tl" %>
<html>
<tl:parse id="customer" type="Customer"
xml="XML_Customer_URL"/>
<tl:parse id="saleBooks" type="BookInventory"
xml="XML_Book_Inventory_URL"/>
<head>
<title>Welcome</title>
</head>
<body>
Welcome
<jsp:getProperty name="customer" property="lastName"/>
<jsp:getProperty name="customer" property="firstName"/>
<table border="0" width="50%">
<tl:iterate id ="book" type="Book"
collection="<%= saleBooks.getBooks() %>" >
<tr>
<td>
<jsp:getProperty name="book"
property="title"/>
</td>
<td>
<jsp:getProperty name="book"
property="price"/>
</td>
</tr>
</tl:iterate>
</table>
</body>
</html>
the "tl:parse" and "tl:iterate" are custom tags. How do I create custom tags so that I can test this example? Thanks, Jeremy