• Post Reply Bookmark Topic Watch Topic
  • New Topic

Custom tags in JSP

 
vinay bedidha
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
iam using jsp custom tags.i want to pass attribute value dynamically in the jsp page.iam pasting the code here.iam unable to pass attribute value dynamically.iam not getting any error.plz help me. here is the code...
jsp code...
<%@ taglib uri="Vinay.tld" prefix="sample" %>
<%
String name=request.getParameter("name");
%>
<sample:hello name="<%=name%>" iterations="2">
TagLib code...
<tag>
<name>hello</name>
<tagclass>Vinay</tagclass>
<!-- Allow for a body to be included for this tag -->
<bodycontent>JSP</bodycontent>
<info>
This is a simple hello tag.
</info>

<!-- Optional attributes -->
<!-- personalized name -->
<attribute>
<name>name</name>
<required>true</required>
<rtexpvalue>true</rtexpvalue>
</attribute>
<!-- allow for the jsp coder to specify how many times to iterate -->
<attribute>
<name>iterations</name>
<required>false</required>
<rtexpvalue>false</rtexpvalue>
</attribute>
</tag>

 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vinay
You are making a mistake here
<rtexpvalue>true</rtexpvalue>
this should be
<rtexprvalue>true<rtexprvalue>
------------------

Mahindrakar
IBM Application Server Forum Moderator

Consultant - Zensar Technologies ,Pune India.
SCJP2, SCJD2 & SCJEA (Part I)
[This message has been edited by Rahul Mahindrakar (edited November 06, 2001).]
 
vinay bedidha
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Rahul,
my problem is solved. Once again thanks a lot...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!