• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Custom Tags : Tag handler class not called

 
madupu Prasanna
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Im new to JSP.

I have a sample custom tag handler which prints date and is compiled with out errors.

when i call the tag in my jsp file, it is printing nothing.

Tag Class :

public int doStartTag() throws JspException
{
dateStamp();
return Tag.EVAL_BODY_INCLUDE;
}
public int doEndTag() throws JspException
{
return Tag.EVAL_PAGE;
}
public void dateStamp() throws JspException
{
JspWriter out = pageContext.getOut();
try
{
out.write("<i>"+ new Date() +"</i>");
out.write("Class calling ... ");
}
catch(IOException e)
{
throw new JspException(e);
}
}

can anyone help me out?

Thanks in advance,
Prasanna
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information.

Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic