Hi Guys,
I was going through the following link which explains how to create
JSP custom tags and everything seems to be working fine except for an error in my JSP file.
Link:
http://www.ibm.com/developerworks/java/library/j-pj2ee8/ The error I got is:
JspTranslate: : XML parsing error on file /WEB-INF/lib/DateTagLib.tld: (line 2, col 9): Document root element "taglib", must match DOCTYPE root "null".. Any idea on what is causing this error?
Btw, the tld file, I created a new xml file and named it as .tld instead of .xml. Am I doing it right?
My Jsp file is as follows:
<blockquote>
code:
<pre name="code" class="core">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@ taglib uri="/WEB-INF/lib/DateTagLib.tld" prefix="abc" %>
<HTML>
<HEAD>
<TITLE>Date tag example</TITLE>
</HEAD>
<BODY>
<H1>Date tag Example</H1>
<p>Hi today is <b><abc:displayDate /></b> </p>
</BODY>
</HTML>
</pre>
</blockquote>
Thanks.
[ July 17, 2008: Message edited by: Arjun Reddy ]