org.apache.cactus.server
Class RequestDispatcherWrapper

java.lang.Object
  extended by org.apache.cactus.server.RequestDispatcherWrapper
All Implemented Interfaces:
javax.servlet.RequestDispatcher

public class RequestDispatcherWrapper
extends java.lang.Object
implements javax.servlet.RequestDispatcher

Wrapper around RequestDispatcher which overrides the forward() and include methods to use the original HTTP request object instead of the simulated one used by Cactus.

Version:
$Id: RequestDispatcherWrapper.java 292559 2005-09-29 21:36:43Z kenney $

Constructor Summary
RequestDispatcherWrapper(javax.servlet.RequestDispatcher theOriginalDispatcher)
           
 
Method Summary
 void forward(javax.servlet.ServletRequest theRequest, javax.servlet.ServletResponse theResponse)
          Call the original RequestDispatcher forward() method but with the original HTTP request (not the simulation one which would make the servlet engine choke !).
 void include(javax.servlet.ServletRequest theRequest, javax.servlet.ServletResponse theResponse)
          Call the original RequestDispatcher include() method but with the original HTTP request (not the simulation one which would make the servlet engine choke !).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestDispatcherWrapper

public RequestDispatcherWrapper(javax.servlet.RequestDispatcher theOriginalDispatcher)
Parameters:
theOriginalDispatcher - the original request dispatcher object
Method Detail

forward

public void forward(javax.servlet.ServletRequest theRequest,
                    javax.servlet.ServletResponse theResponse)
             throws java.io.IOException,
                    javax.servlet.ServletException
Call the original RequestDispatcher forward() method but with the original HTTP request (not the simulation one which would make the servlet engine choke !).

Specified by:
forward in interface javax.servlet.RequestDispatcher
Parameters:
theRequest - the simulation HTTP request
theResponse - the original HTTP response
Throws:
java.io.IOException - RequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
javax.servlet.ServletException - RequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)

include

public void include(javax.servlet.ServletRequest theRequest,
                    javax.servlet.ServletResponse theResponse)
             throws java.io.IOException,
                    javax.servlet.ServletException
Call the original RequestDispatcher include() method but with the original HTTP request (not the simulation one which would make the servlet engine choke !).

Specified by:
include in interface javax.servlet.RequestDispatcher
Parameters:
theRequest - the simulation HTTP request
theResponse - the original HTTP response
Throws:
java.io.IOException - RequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
javax.servlet.ServletException - RequestDispatcher.forward(javax.servlet.ServletRequest, javax.servlet.ServletResponse)


Copyright © 2001-2009 The Apache Software Foundation. All Rights Reserved.