Saturday, July 3, 2010

How to Create Custom Tag Library

How to Create Custom Tag Library

1>Create a java file by select application=>New=>class
Here 2 java file has been created one is memberInfo and another is FeedbackInfo.MemberInfo contain member information and FeedbackInfo contain member feedback information.For a specific member there may be number of feedback.

MemberInfo.java

FeedbackInfo.java

2>Create tld file and keep it into WEB-INF/tld directory
Two tld file has been created for tow java files.One is MemberInfo.tld and another is MemberFeedbackInfo.tld.

MemberInfo.tld

MemberFeedbackInfo.tld

3>Create a jsp page and assign require tld on the top of the page.

4>Project folder structure

No comments: