This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes Custom Tags v/s Java Beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Custom Tags v/s Java Beans" Watch "Custom Tags v/s Java Beans" New topic
Author

Custom Tags v/s Java Beans

L Goundalkar
Ranch Hand

Joined: Jul 05, 2001
Posts: 395
Hi all,
Is there any thumb rule when to use Custom Tag and when to use Java Beans.
I feel we can get the solution using either of them.
Am I right?
[ July 07, 2003: Message edited by: L Goundalkar ]

SCJP, SCWCD
Christian Ebage
Ranch Hand

Joined: Aug 29, 2002
Posts: 47
I feel Custom Tags use JavaBeans to display dynamic content, since JavaBeans contain data, and have methods to get and mutate the data and no presentation logic.
Custom Tags have a kind of managing role as far as the Javabean/Tag ralationship is concerned. I would say it is the way most Java Developers would prefare to write JSPs which use JavaBeans.
Ebage
SCJP
SCEA
[ July 07, 2003: Message edited by: Christian Ebage ]
Dhananjay Ghanwat
Greenhorn

Joined: Dec 23, 2002
Posts: 27
Use Custom Tags when you want to help your VIEW with some processing.
Use Java Beans when you want to help your BUSINESS with some processing
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Custom Tags v/s Java Beans
 
Similar Threads
JavaBeans Vs Custom Tags
How to implement following Code
Custom Tags
is the prefix of taglibs case-sensitive?
use of component binding