servletunit
Class RequestDispatcherSimulator

java.lang.Object
  extended byservletunit.RequestDispatcherSimulator

public class RequestDispatcherSimulator
extends java.lang.Object

Simulates a javax.servlet.RequestDispatcher object.


Constructor Summary
RequestDispatcherSimulator(java.lang.Object dispatchedResource)
           
 
Method Summary
 void forward(ServletRequest request, ServletResponse response)
          Simulates the forward method of the javax.servlet.RequestDispatcher interface
 java.lang.String getForward()
           
 void include(ServletRequest request, ServletResponse response)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestDispatcherSimulator

public RequestDispatcherSimulator(java.lang.Object dispatchedResource)
Parameters:
dispatchedResource - The dispatchedResource object represents the resource that this javax.servlet.RequestDispatcher is tied to. Currently this class only supports javax.servlet.Servlet objects and java.lang.String objects. If the parameter passed in is not a javax.servlet.Servlet object when forward or include is called the parameter's toString method is called and sent to System.out. Otherwise, the appropriate service method is called.
Method Detail

forward

public void forward(ServletRequest request,
                    ServletResponse response)
             throws ServletException,
                    java.io.IOException
Simulates the forward method of the javax.servlet.RequestDispatcher interface

Throws:
ServletException
java.io.IOException

include

public void include(ServletRequest request,
                    ServletResponse response)
             throws ServletException,
                    java.io.IOException
Throws:
ServletException
java.io.IOException

getForward

public java.lang.String getForward()


Copyright © Deryl Seale All Rights Reserved.