Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Methods in JSP  RSS feed

 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

My current development in JSP needs me to write a method in JSP, this method is actually a recursive call, which is need to generate dynamic UI.

Wanted to know if this is good way to accomplish the task, I'm not sure if its good to write methods in JSP.

TIA
MB
 
arnel nicolas
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Writing java code in jSP is a bad habit especially when your project grows big. Code are very hard to maintain when HTML and java code are mixed together. The MVC pattern requires you to write your method/ business logic in the servlet and the presentation layer is being take cared by JSP.
[ July 24, 2004: Message edited by: arnel nicolas ]
 
Malhar Barai
Author
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Arnel,

Well I know that MVC strictly tell you never to write code in JSP but my current project requires me to do it, I had tried a lot to avoid it,

Basically I wanted to know the disadvantages of writing methods in JSP, bcoz I need to call that method recursively, so ain't sure what other way to do it.

Thanx Anyway
MB
 
Praful Thakare
Ranch Hand
Posts: 643
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Malhar,

whats the diffculty in writing this method in java bean and call it recursively there ??
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!