|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.stripes.mock.MockRequestDispatcher
public class MockRequestDispatcher
Mock implementation of a RequesetDispatcher used for testing purposes. Note that the mock implementation does not support actually forwarding the request, or including other resources. The methods are implemented to record that a forward/include took place and then simply return.
| Constructor Summary | |
|---|---|
MockRequestDispatcher(String url)
Constructs a request dispatcher, giving it a handle to the creating request. |
|
| Method Summary | |
|---|---|
void |
forward(ServletRequest req,
ServletResponse res)
Simply stores the URL that was requested for forward, and returns. |
MockHttpServletRequest |
getMockRequest(ServletRequest request)
Locates the MockHttpServletRequest in case it is wrapped. |
void |
include(ServletRequest req,
ServletResponse res)
Simply stores that the URL was included an then returns. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MockRequestDispatcher(String url)
| Method Detail |
|---|
public void forward(ServletRequest req,
ServletResponse res)
throws ServletException,
IOException
forward in interface RequestDispatcherServletException
IOException
public void include(ServletRequest req,
ServletResponse res)
throws ServletException,
IOException
include in interface RequestDispatcherServletException
IOExceptionpublic MockHttpServletRequest getMockRequest(ServletRequest request)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||