Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Best choice!

 
Vanchi Nathan
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I'm a totally confused to decide which one, Javabeans or Custom tags, is the best to use within a JSP page and in what circumstances?
pl. help ...
 
Winston Smith
Ranch Hand
Posts: 136
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm relatively new to JSP, and I've been using Beans to support all the business logic of my applications. However, I'm starting to look at custom tags because the code seems alot cleaner -- it takes virtually all those annoying scriplets out of your JSP, and moves them to a class where they should be. I'm not sure how these two technologies compare as far as efficiency, but it does seem that custom tags lend themselves to cleaner, more modular code. Hopefully there will be some more posts to discuss this.
WS
Oh yeah, I've been reading some interesting articles on JSTL (beginner tutorials, etc.) at IBM developerWorks: http://www-106.ibm.com/developerworks/java/library/j-taglib/
[ April 01, 2004: Message edited by: Winston Smith ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64708
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's certainly not an either-or scenario.
In a well-architected web app, the JSP pages will serve the function of the View and will perform little to no processing on their own. In this scenario, beans are a great way to carry data from the controller (usually a servlet) to the view. Custom actions (formerly known as custom tags) are great to create re-usable on-page components.
I use both liberally in my web apps.
 
Vanchi Nathan
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
Thanks you so much...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic