hi martin
thanks for the report.
i can't look into it right now but hopefully i'll be able to find some
time soon. (unless there's anyone else who wants to volunteer to look at
it...)
- robert
On Friday, February 22, 2002, at 01:37 AM, Martin Redington wrote:
>
> I've run into an odd problem while developing a servlet
> for tomcat, using ecs to generate html output.
>
> Just thought I'd post this, to help anyone else who
> hits the same problem, and maybe someone will patch ecs
> to fix this (or at least make the failure more graceful).
>
> It took me a while to work out. I searched for "fatal"
> and "stack" in the archives, but couldn't find anything.
>
> I don't have a test case yet, but the basic issue appears
> to be as follows:
>
> given the following (incorrect) code:
>
> TR tr = new TR();
> TD td = new TD();
> td.addElement("some content");
> tr.addElement(tr);
>
> when tr.toString() is called, the jvm (or at least tomcat,
> which is managing my servlet) drops dead, with no stack trace
> available.
>
> Of course that last line should have been:
>
> tr.addElement(td);
>
> but I've been working too hard recently.
>
> I suspect that adding an element to itself sets up some kind
> of horrible infinite recursion inside ecs. Some kind of check that
> "this != element", and an appropriate exception should ensure that
> an appropriate error message is generated, rather than sudden tomcat
> death ...
>
>
>
>
>
>
> --
> To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>