Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Sun XML and JSP Tutorial Help (Custom Tags)

843835Dec 26 2002 — edited Dec 27 2002
I 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&nbsp;
<jsp:getProperty name="customer" property="lastName"/>
&nbsp;
<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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 24 2003
Added on Dec 26 2002
1 comment
83 views