wood burning stoves 2.0*
The moose likes JSP and the fly likes Best choice! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Best choice!" Watch "Best choice!" New topic
Author

Best choice!

Vanchi Nathan
Ranch Hand

Joined: Feb 24, 2004
Posts: 107
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 ...


Best regards,<br /> <br />vanchin
Winston Smith
Ranch Hand

Joined: Jun 06, 2003
Posts: 136
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 ]

for (int i = today; i < endOfTime; i++) { code(); }
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61449
    
  67

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Vanchi Nathan
Ranch Hand

Joined: Feb 24, 2004
Posts: 107
Hello all,
Thanks you so much...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Best choice!