Mega Code Archive
Extends Tag Support DoEndTag
MyTag.java
package taglib;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
import java.io.IOException;
public class MyTag extends TagSupport
{
public int doEndTag() throws JspException {
try {
pageContext.getOut().print("Hello from JSP!");
} catch (Exception e) {
throw new JspException(e.toString());
}
return EVAL_PAGE;
}
}
MyTag.tld
1.0
1.2
TagExamples
Example tags.
message
taglib.MyTag
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
Jsp page with custom tag
<%@ taglib prefix="l" uri="WEB-INF/MyTag.tld" %>
A Simple Tag That Inserts Text
A Simple Tag That Inserts Text