This was a bug in 0.7.8b if bodycontent was set to "tagdependant", it has been fixed
in 0.7.9.
Note though that 0.7.9 has been upgraded to the JSP 1.1 PR2 spec, so there'll be some
rewriting required in your tag code.
Have a nice day! :)
/Magnus Stenman, the Orion team
----- Original Message -----
From: Morten Bach M�ller <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 27, 1999 11:24 AM
Subject: JSP tags: Body content duplicated
> Hi,
>
> I have implemented a number tag that simply reads the body content and
> print it using the JspWriter:
>
> public class NumberTag extends Tag {
> public NumberTag(String prefix, String tagname) {
> super(prefix, tagname);
> }
> public int doStartTag() {
> return EVAL_BODY;
> }
> public int doEndTag() throws JspError {
> JspWriter out = getPreviousOut();
> try {
> out.println(getBodyOut().getString());
> } catch (IOException e) {
> }
> return EVAL_PAGE;
> }
> }
>
> When it is used in the following .jsp file the body content is written
> twice, i.e. getBodyOut().getString() returns "1234512345":
>
> <%@ page session="false" %>
> <%@ taglib uri="mytags.jar" prefix="test" %>
>
> <html>
> <body>
> <test:number decimals=2>12345</test:number>
> </html>
>
> Output:
> 1234512345
>
> Any idea why ?
>
> /Morten