Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

servletunit
Class RequestDispatcherSimulator  view RequestDispatcherSimulator download RequestDispatcherSimulator.java

java.lang.Object
  extended byservletunit.RequestDispatcherSimulator
All Implemented Interfaces:
javax.servlet.RequestDispatcher

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

Simulates a javax.servlet.RequestDispatcher object.


Field Summary
private  java.lang.Object dispatchedResource
           
 
Constructor Summary
RequestDispatcherSimulator(java.lang.Object dispatchedResource)
           
 
Method Summary
 void forward(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
          Simulates the forward method of the javax.servlet.RequestDispatcher interface
 java.lang.String getForward()
           
 void include(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)
          Includes the content of a resource (servlet, JSP page, HTML file) in the response.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dispatchedResource

private java.lang.Object dispatchedResource
Constructor Detail

RequestDispatcherSimulator

public RequestDispatcherSimulator(java.lang.Object dispatchedResource)
Method Detail

forward

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

Specified by:
forward in interface javax.servlet.RequestDispatcher

include

public void include(javax.servlet.ServletRequest request,
                    javax.servlet.ServletResponse response)
             throws javax.servlet.ServletException,
                    java.io.IOException
Description copied from interface: javax.servlet.RequestDispatcher
Includes the content of a resource (servlet, JSP page, HTML file) in the response. In essence, this method enables programmatic server-side includes.

The javax.servlet.ServletResponse object has its path elements and parameters remain unchanged from the caller's. The included servlet cannot change the response status code or set headers; any attempt to make a change is ignored.

The request and response parameters must be either the same objects as were passed to the calling servlet's service method or be subclasses of the javax.servlet.ServletRequestWrapper or javax.servlet.ServletResponseWrapper classes that wrap them.

Specified by:
include in interface javax.servlet.RequestDispatcher

getForward

public java.lang.String getForward()