|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.click.servlet.MockRequestDispatcher
public class MockRequestDispatcher
Mock implementation of RequestDispatcher.
forward(ServletRequest, ServletResponse) or
include(ServletRequest, ServletResponse) is called.
The resourcePath can later be retrieved by calling
MockRequest.getForward() or MockRequest.getIncludes().
| Constructor Summary | |
|---|---|
MockRequestDispatcher(String resourcePath)
Constructs a new RequestDispatcher instance for the specified resourcePath. |
|
| Method Summary | |
|---|---|
void |
forward(ServletRequest request,
ServletResponse response)
This method stores the dispatcher's resourcePath on the request. |
void |
include(ServletRequest request,
ServletResponse response)
This method stores the dispatcher's resourcePath on the request. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockRequestDispatcher(String resourcePath)
resourcePath - the resource path to dispatch to| Method Detail |
|---|
public void forward(ServletRequest request,
ServletResponse response)
throws ServletException,
IOException
MockRequest.getForward()
forward in interface RequestDispatcherrequest - the servlet requestresponse - the servlet response
ServletException - if the response was already
committed
IOException - if the target resource throws this exception
public void include(ServletRequest request,
ServletResponse response)
throws ServletException,
IOException
MockRequest.getIncludes()
include in interface RequestDispatcherrequest - the servlet requestresponse - the servlet response
ServletException - if the response was already
committed
IOException - if the target resource throws this exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||