关闭

recursion in jsp

452人阅读 评论(0) 收藏 举报

    Under the MVC model 2 architecture, there is need that the view provide recursion method so as to render complex object, such as an arbitrary level tree. But now, jsp does not support recursion method, though it supports loop/switch control to render simple object, such as collection.

    Then how to achieve recursion in jsp?

        Jsp custom tag. I am not familiar with this.

        Scriptlet. As commented by some people, yuck.

        Loop substitution for recursion. An algorithm which can achieve the same effect of recursion, but use looping instead. This has bad readability.

        XSLT. Translate xml representation of the complex object to html. I prefer the this, because I am familiar  with xslt and it is internet standard and it forms good 'architecture', loose-coupled, reusable, neat. 

 

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:2323次
    • 积分:57
    • 等级:
    • 排名:千里之外
    • 原创:3篇
    • 转载:0篇
    • 译文:0篇
    • 评论:0条
    文章分类
    文章存档