Example of simple tag with dynamic row data: iterating the body

Here are all the code for demonstrating how to use a simple tag with dynamic row data.
1. TLD file "test.tld" under WEB-INF directory. I saw many people asking how to make TLD file online, you just create a file named .tld, that's all. Eclipse doesn't provide IDE tools to help.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
	<description>This is a demonstration tag library</description>

2. A JSP page "result.jsp"

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
<%@ taglib prefix="myTags" uri="simpleTags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Testing Custom Tag</title>
	<table border="1">

3. Tag handler class "SimpleTagTest"

package com.programcreek.test;
import java.io.IOException;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.SimpleTagSupport;
public class SimpleTagTest extends SimpleTagSupport {
	String[] movies = {"monsoon Wedding", "Saved", "Fahrenheit 9/11"};
	public void doTag() throws JspException, IOException{
		for(int i = 0; i < movies.length; i++){
			getJspContext().setAttribute("movie", movies[i]);
Category >> JSP/JSF  
If you want someone to read your code, please put the code inside <pre><code> and </code></pre> tags. For example:
String foo = "bar";