This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JSP and the fly likes html content with recursive java function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "html content with recursive java function" Watch "html content with recursive java function" New topic
Author

html content with recursive java function

zainu Mehmood
Ranch Hand

Joined: May 09, 2007
Posts: 45
Hi,

I have a list which contains menu items. I have to read this list recursively to add UL and Li tages for parents and childs. So i have added a java function in my JSP to create code recursively. But i am getting some problem and i feel its not the right approach. Can you please suggest me if there is any better approach for this.

BR
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

It is not the right approach. Modern JSP should have no Java code in them at all.

If you need to execute code, you should look into using EL functions or custom tags.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
zainu Mehmood
Ranch Hand

Joined: May 09, 2007
Posts: 45
Bear Bibeault wrote:It is not the right approach. Modern JSP should have no Java code in them at all.

If you need to execute code, you should look into using EL functions or custom tags.


Thanks for your reply. Can you give me some pointer to recursively iterate a list using JSTL.
 
 
subject: html content with recursive java function
 
Similar Threads
Form a tree parent -childs from String
recursive function usage in JSP
Displaying a randomised list
list the files or subdirectories ina directory
Disable all components by getComponents