You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by p e t e h o r n e <pe...@bolshi.com.au> on 2003/01/31 03:28:02 UTC
Problem getting Filter Calling JSP via getRequestDispatcher("/index.jsp").include()
Hi,
I am trying to get a filter to capture the output from a JSP which is
then included with the output from the target at the end of the filter
chain. What the wrapper does is capture all the bytes so they can be
merged. I can get it to work when the dispatcher is called on
index.html - but not index.jsp. Can anyone help here? I would greatly
appreciate it.
Thanks...Pete
public void doFilter( ServletRequest rIn, ServletResponse rOut,
FilterChain chain )
throws ServletException, IOException {
ResponseWrapper out = new ResponseWrapper( (HttpServletResponse)rOut );
config.getServletContext().getRequestDispatcher("/index.jsp").include(
rIn, out );
chain.doFilter( rIn, out );
... do some more here ...
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org