Custom Tag in jsp

Helloi everybody ya,

This is about custom tags in JSP.But whenever i try to call jsp it givec thefolloeing error.

"org.apache.jasper.compiler.CompileException: E:\jakarta-tomcat-3.2.3\webapps\ROOT\JustChecking\ FirstTag.jsp(9,50) Unable to open taglibrary /Web-inf/tlds/DemoTags.tld : Parse Error in the tag library descriptor: Expected "" to terminate element starting on line 16."

I've build a folder in websphere /webapps/roots dir. and put my jsp/java class files their and also put the same folder in /webapps/roots/web-inf/classes here i also put .tld file. shd i also change web.xml

Code for my .tld file is

"""

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"

"http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> <taglib>

<tlibversion>1.0</tlibversion>

<jspversion>1.1</jspversion>

<shortname>DemoTags</shortname>

<uri>http://www.stardeveloper.com</uri>

<info>Demo Tags Library</info>

<tag>

<name>firsttag</name>

<tagclass>JustChecking.FirstTag</tagclass>

<bodycontent>empty</bodycontent>

<info>Your first JSP Tag</info> <attribute>

<name>name</name>

<required>false</required>

</attribute>

</tag>

</taglib>

[1524 byte] By [Raaj_Rock_n_Rulesa] at [2007-11-27 5:29:29]
# 1

Hello Raaj..

i am not sure but i think the line where you have defined body content

you have entered the value as empty .The 2 values possible are EMPTY and JSP. They are constants .I feel hence they should be in Caps rather than in small .please try that and let me know.

I am sure your problem will be solved.

Java-Manoja at 2007-7-12 14:52:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

yeah you should this is how you need to configure your web.xml

<jsp-config>

<taglib>

<taglib-uri>mycustomtag</taglib-uri>

<taglib-location>/WEB-INF/tld/DemoTags.tld</taglib-location>

</taglib>

</jsp-config>

and at jsp level you can access it as

<%@ taglib uri="mycustomtag" prefix="mytag" %>

<mytag:property ..... />

Hope that might help :)

REGARDS,

RaHuL

RahulSharnaa at 2007-7-12 14:52:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
Thank you ManojIt really works...Now I am able to execute my application. Duke points has been credited to your account.Thank you once again.
Raaj_Rock_n_Rulesa at 2007-7-12 14:52:45 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...