Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html content with recursive java function

 
zainu Mehmood
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64980
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
zainu Mehmood
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic