Mega Code Archive
 
 
    
Setup Environment for Development Custom Tag
MyTag.java
 
package taglib;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.io.IOException;
public class MyTag extends TagSupport 
{
    public int doStartTag() throws JspException 
    {
        return EVAL_BODY_INCLUDE;
    }
    
    public int doAfterBody() throws JspException 
    {
            System.out.println("Hello!");
            return SKIP_BODY;
    }
} 
MyTag.tld
 
  1.0
  1.2
  taglib1
  http://rntsoft.com/taglibs
  
  A simple tag library 
  
  
  
    log
    taglib.MyTag
    TAGDEPENDENT
    
  Log a message.
    
  
  
 
web.xml
 
  
  Example web application illustrating the use of tags in the
  "request" custom tag library, from the JAKARTA-TAGLIBS project.
  
  
    http://rntsoft.com/taglibs
    /WEB-INF/MyTag.tld
  
  
    admin
  
 
JSTL code
 
<%@ taglib uri="http://rntsoft.com/taglibs" prefix="l"%>
    
        Creating a Simple Custom Tag
    
    
        Creating a Simple Custom Tag
        
            I'm sending some text to the server console!