Customize tag lib 2

来源:互联网 发布:淘宝代理招聘 编辑:程序博客网 时间:2024/05/18 03:45

We also can customize the tag lib using component class, here are the steps:

1. Define the component

 

 

2. Define the tag, here we'll define a datagrid using jQuery plugin, so you should add necessary javascript before using the tag.

 

 

3. Define the tld, which should be added to "WEB-INF/tld/tms-tags.tld".

 

 

4. Configure the tag in web.xml

 

 

5. Use the tag lib in jsp

 

 

Ok, you'll see the result.