I have written a custom JSP tag to include JSPs. Below is the simplified
implementation. Why doesn't Tomcat display an error report when
accessing 'page.jsp', as it does when accessing 'broken.jsp'? Anyone's
help would be VERY much appreciated.
Thanks,
Jack
package test;
import java.io.*;
import javax.servlet.*;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*;
public class IncludeTag extends TagSupport {
protected String path;
public int doEndTag() throws JspException {
try {
pageContext.include(path);
} catch (IOException exception) {
exception.printStackTrace();
throw new JspException(exception);
} catch (ServletException exception) {
exception.printStackTrace();
throw new JspException(exception);
}
return EVAL_PAGE;
}
public void setPath(String path) {
this.path = path;
}
}
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN"
"http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
<taglib>
<tlib-version>
0.1
</tlib-version>
<jsp-version>
1.2
</jsp-version>
<short-name>
test
</short-name>
<tag>
<name>
include
</name>
<tag-class>
test.IncludeTag
</tag-class>
<attribute>
<name>
path
</name>
<required>
true
</required>
</attribute>
</tag>
</taglib>
<%@ taglib uri="/WEB-INF/test.tld" prefix="test" %>
<test:include path="broken.jsp"/>
<%@ page import="non-existant-class" %>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>