Think it in this way. When you write code you find a lot of repeating part
then you take them all off and make a method for it. The same thing for
taglib. When you write JSP you find a lot of that then you can take them off
and put a custom tag there. At least this is one practical reason to
consider a custom tag.
You use JSP language to write tag including all implied object like request,
response... But when you use bean you use it in set/put properties way,
right? A bean is supposed to be friend of JSP and taglib is supposed to be
family member of JSP. But, I never try, all thing if can do by tablib should
also can do by bean.
Fei Li
-----Original Message-----
From: kuttappan [mailto:[EMAIL PROTECTED]]
Sent: Sunday, April 01, 2001 8:44 AM
To: [EMAIL PROTECTED]
Subject: Beans vs. Taglibs
Hello all,
I'm new to JSP and would like to know what is the difference between
JavaBeans and custom actions [Taglibs]. Where is it most appropriate to use
beans and where to use tablibs.
In "Java Server Pages" [O'Reilly] Hans Bergsten has written "A custom
action - actually a tag handler class for a custom action - is basically a
bean with property setter methods corresponding to the custom action
element's attributes."
Does this mean that beans and tablibs work the same way?
Rohit.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.237 / Virus Database: 115 - Release Date: 07/03/2001
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets