what is custom tags with example?

Answer Posted / ravi

Custom tags are 5 type they are
1. simple custom tag
2. param custom tag
3. iterator custom tag
4. body custom tag
5. nested custom tag

if we want write a simple custom tags, we need to follow
these 5 steps
1. we need write directory taglib and uri to ur jsp page
2. we need call custom tag to ur jsp page
3. we need declare taglib uri and taglib loaction in web.xml
4. we need write taglib Discriptor(TLD) file
5. we need write tag handler class

if u want to write tag handler class, our class must
implements tag interface, it available in
javax.servlet.jsp.tagext.Tag package

Tag is an Interface it contains 6 abstract methods and 4
constant variables i.e,

Abstract methods Constants
PageContext EVAL_BODY_INCLUDE
setParent SKIP_BODY
getParent EVAL_PAGE
doStartTag SKIP_PAGE
doEndTag
relase

it contain some more explanation is there....!

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which non-unicode letter characters may be used as the first character of an identifier?

597


take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).

1533


how to write a program for sending mails between client and server

1555


What is the significance of listiterator?

569


Can an object be null?

549






State differences between C and Java?

664


what do you understand by synchronization? : Java thread

549


What is constructor chaining in java?

587


How do I print a “?

575


Can we call virtual funciton in a constructor ?

1778


What is difference between string and new string?

540


How many bits is a float?

542


What are features of java?

560


Explain inheritance in java?

555


Why do you canvas?

613