tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From " p e t e h o r n e " <p...@bolshi.com.au>
Subject Problem getting Filter Calling JSP via getRequestDispatcher("/index.jsp").include()
Date Fri, 31 Jan 2003 02:28:02 GMT

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


Mime
View raw message