Looping a tree-structure of objects of unknown depth

2003-02-14 Thread Sakke Wiik
I have a tree-structure of objects similar to a filesystem,
where directories has subdirectories to an unknown depth.
How can i loop and display all these in jsp without knowing the 
depth of the tree? it's easy to do in pure java with a method
calling itself, but I can't use methods inside a jsp, or can I?

cheers,
Sakke Wiik

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Looping a tree-structure of objects of unknown depth

2003-02-14 Thread Heinonen Jani
You can define methods inside a JSP, when you use the declaration block. 

The regular JSP code goes to the service method of the servlet, whereas
things in the declaration block are object/class wide.
Of course, this is something that we are trying to avoid by using tag
libraries. At worst, we end up with applications where all of the logic is
in JSP's.

%!
  public void myMethod(Object someParameter) {
 ...
  }
%

-Original Message-
From: Sakke Wiik [mailto:[EMAIL PROTECTED]] 
Sent: Friday, February 14, 2003 12:41 PM
To: [EMAIL PROTECTED]
Subject: Looping a tree-structure of objects of unknown depth


I have a tree-structure of objects similar to a filesystem, where
directories has subdirectories to an unknown depth. How can i loop and
display all these in jsp without knowing the 
depth of the tree? it's easy to do in pure java with a method calling
itself, but I can't use methods inside a jsp, or can I?

cheers,
Sakke Wiik

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]