com.jfw.web.tags
Class GenericTag

java.lang.Object
  extended by com.jfw.web.tags.GenericTag
All Implemented Interfaces:
javax.servlet.jsp.tagext.BodyTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag

public class GenericTag
extends java.lang.Object
implements javax.servlet.jsp.tagext.BodyTag

A tag implementation for Parser.
To use this tag you have to add in directory WEB-INF a file with name mytaglib.tld with content:

 <?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">

 <taglib>
   <tlibversion>1.0</tlibversion>
   <jspversion>1.1</jspversion>
   <shortname>mtl</shortname>
   <uri></uri>
   <info>My Tag library</info>
   <tag>
     <name>generic</name>
     <tagclass>com.jfw.web.tags.GenericTag</tagclass>
     <bodycontent>JSP</bodycontent>
     <info>Generic parse tag</info>
     <attribute>
     <name>value</name>
     <required>false</required>
     <rtexprvalue>true</rtexprvalue>
     </attribute>
   </tag>
 </taglib>
 
Also this lines must be added in web.xml:
 <jsp-config>
 
   ...

   <taglib>
     <taglib-uri>/tags/mytaglib</taglib-uri>
     <taglib-location>/WEB-INF/mytaglib.tld</taglib-location>
   </taglib>
 
   ...
 
 </jsp-config>
 

Example
 <%@ taglib uri="/WEB-INF/mytaglib.tld" prefix="mtl" %>
 
 ...
 
 <mtl:generic>
   ...
 </mtl:generic>


Field Summary
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
GenericTag()
           
 
Method Summary
 int doAfterBody()
           
 int doEndTag()
          Tag implementation.
 void doInitBody()
           
 int doStartTag()
           
 javax.servlet.jsp.tagext.Tag getParent()
           
 void release()
           
 void setBodyContent(javax.servlet.jsp.tagext.BodyContent bodyContent)
           
 void setPageContext(javax.servlet.jsp.PageContext pageContext)
           
 void setParent(javax.servlet.jsp.tagext.Tag parent)
           
 void setValue(java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericTag

public GenericTag()
Method Detail

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspTagException
Tag implementation.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Returns:
Tag.EVAL_PAGE.
Throws:
javax.servlet.jsp.JspTagException

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspTagException
Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Throws:
javax.servlet.jsp.JspTagException

doAfterBody

public int doAfterBody()
                throws javax.servlet.jsp.JspException
Specified by:
doAfterBody in interface javax.servlet.jsp.tagext.IterationTag
Throws:
javax.servlet.jsp.JspException

doInitBody

public void doInitBody()
                throws javax.servlet.jsp.JspTagException
Specified by:
doInitBody in interface javax.servlet.jsp.tagext.BodyTag
Throws:
javax.servlet.jsp.JspTagException

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag

getParent

public javax.servlet.jsp.tagext.Tag getParent()
Specified by:
getParent in interface javax.servlet.jsp.tagext.Tag

setPageContext

public void setPageContext(javax.servlet.jsp.PageContext pageContext)
Specified by:
setPageContext in interface javax.servlet.jsp.tagext.Tag

setParent

public void setParent(javax.servlet.jsp.tagext.Tag parent)
Specified by:
setParent in interface javax.servlet.jsp.tagext.Tag

setBodyContent

public void setBodyContent(javax.servlet.jsp.tagext.BodyContent bodyContent)
Specified by:
setBodyContent in interface javax.servlet.jsp.tagext.BodyTag

setValue

public void setValue(java.lang.String value)