View Full Version : help with jsp (include) recursion

12-12-2002, 09:44 PM
Has anyone ever tried to do JSP recursion via include?
We've got a situation where a jsp is recursing on itself to implement the equivalent of function recursion. The problem seems to be that either the variables being used in the jsp are not distinct from different levels of the recursion, or something else is being messed up. The reason we were trying to do the recursion is because the jsp is emiting tag lib for a recursive structure.

<% some java code %>

<% some java code %>


If we use functions, we find that they have to be in a declarative section which doesn't allow scriplets to work.

<%! public void func()
%> <== can't interrupt the func to place emitted tags

<% more of the func

The above doesn't work.
We tried using out.println, but unfortunately the tag library stuff is not evaluated when emitted via out.println.

Any ideas???? We'd like not to use jsp recursion, but haven't found a way that works.