Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » JSP Interest »

Re: Custom Tags

Vijith

2003-08-14


Hi David,
Thanks for the reply. I was doing all these and it was not working out.What i was
missing out was the return type in the doStartTag needs to be EVAL_BODY_BUFFERED.

thanks
vijith

"David M. Karr" wrote:

> >>>>> "Vijith" == Vijith <Vijith.vayanippetta@(protected):
>
>   Vijith> Hi All,
>   Vijith> Is there anyway in which I can prevent the body inside a custom tag from
>   Vijith> appearing in the output.
>
>   Vijith> ie
>
>   Vijith> <emptag>
>   Vijith> this is the text
>   Vijith> </emptag>
>
>   Vijith> Now i donot want this is the text to appear in the output
>
>   Vijith> but i want to get this text in the Custom Tag Handler and then modify it
>   Vijith> and tehn put it back to the body
>
>   Vijith> I would like to get it as
>
>   Vijith> This<br>is<br>the <br>text
>
> Read almost any reference about building JSP custom tags. You'll find that a
> tag class extending BodyTag can call "getString()" on the body content, massage
> the value, and then use the "getPreviousOut()" method on the tag handler to get
> the writer to write the output to. You can get a brief summary of this in the
> JSP tutorial on the Sun web site.
>
> --
> ===================================================================
> David M. Karr       ; Java/J2EE/XML/Unix/C++
> dmkarr@(protected)
>
> ===========================================================================
> To unsubscribe: mailto listserv@(protected)".
> For digest: mailto listserv@(protected)".
>
> Some relevant archives, FAQs and Forums on JSPs can be found at:
>
> http://java.sun.com/products/jsp
> http://archives.java.sun.com/jsp-interest.html
> http://forums.java.sun.com
> http://www.jspinsider.com

===========================================================================
To unsubscribe: mailto listserv@(protected)".
For digest: mailto listserv@(protected)".

Some relevant archives, FAQs and Forums on JSPs can be found at:

http://java.sun.com/products/jsp
http://archives.java.sun.com/jsp-interest.html
http://forums.java.sun.com
http://www.jspinsider.com


©2008 junlu.com - Jax Systems, LLC, U.S.A.