aspose file tools*
The moose likes JSP and the fly likes Custom Tags : Tag handler class not called Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Custom Tags : Tag handler class not called" Watch "Custom Tags : Tag handler class not called" New topic
Author

Custom Tags : Tag handler class not called

madupu Prasanna
Greenhorn

Joined: May 18, 2010
Posts: 2
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

Joined: Jan 10, 2002
Posts: 61221
    
  66

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Custom Tags : Tag handler class not called