Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Seam Core JSF2 2.3.0.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.seam.mock
Class MockRequestDispatcher

    java.lang.Object
      org.jboss.seam.mock.MockRequestDispatcher

All Implemented Interfaces:
  javax.servlet.RequestDispatcher

    public class MockRequestDispatcher

extends Object
implements javax.servlet.RequestDispatcher

Mock implementation of the `RequestDispatcher` interface.

Used for testing the web framework; typically not necessary for testing application controllers.

Since:
  1.0.2
Author:
  Rod Johnson, Juergen Hoeller

Field Summary

Fields inherited from interface javax.servlet.RequestDispatcher
`ERROR_EXCEPTION, ERROR_EXCEPTION_TYPE, ERROR_MESSAGE, ERROR_REQUEST_URI, ERROR_SERVLET_NAME, ERROR_STATUS_CODE, FORWARD_CONTEXT_PATH, FORWARD_PATH_INFO, FORWARD_QUERY_STRING, FORWARD_REQUEST_URI, FORWARD_SERVLET_PATH, INCLUDE_CONTEXT_PATH, INCLUDE_PATH_INFO, INCLUDE_QUERY_STRING, INCLUDE_REQUEST_URI, INCLUDE_SERVLET_PATH`

Constructor Summary
`MockRequestDispatcher(String url)` Create a new MockRequestDispatcher for the given URL.

Method Summary
`void` | `forward(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)`
`protected EnhancedMockHttpServletResponse` | `getMockHttpServletResponse(javax.servlet.ServletResponse response)` Obtain the underlying EnhancedMockHttpServletResponse, unwrapping `HttpServletResponseWrapper` decorators if necessary.
`void` | `include(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MockRequestDispatcher

    public MockRequestDispatcher(String url)

  Create a new MockRequestDispatcher for the given URL.

  Parameters:
    `url` - the URL to dispatch to.

Method Detail

### forward

    public void forward(javax.servlet.ServletRequest request,
                        javax.servlet.ServletResponse response)

  Specified by:
    `forward` in interface `javax.servlet.RequestDispatcher`

### include

    public void include(javax.servlet.ServletRequest request,
                        javax.servlet.ServletResponse response)

  Specified by:
    `include` in interface `javax.servlet.RequestDispatcher`

### getMockHttpServletResponse

    protected EnhancedMockHttpServletResponse getMockHttpServletResponse(javax.servlet.ServletResponse response)

  Obtain the underlying EnhancedMockHttpServletResponse, unwrapping `HttpServletResponseWrapper` decorators if necessary.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Seam Core JSF2 2.3.0.Final
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 Seam Framework. All Rights Reserved.