Details
Description
I wrote to test class to test a servlet which finally does a forward to a JSP.
When I call the forward method on the RequestDispatcher, I get the following
error. It looks like
org.apache.cactus.server.RequestDispatcherWrapper.dispatch179_forward is trying
to cast the WebAppRequestDispatcher to something it shouldn't. Here is the
stack trace ...
java.lang.ClassCastException:
com.ibm.servlet.engine.webapp.WebAppDispatcherRequest
at org.apache.cactus.server.RequestDispatcherWrapper.dispatch179_forward
(LogAspect.aj(1k):102)
at org.apache.cactus.server.RequestDispatcherWrapper.around179_forward
(LogAspect.aj(1k):1149)
at org.apache.cactus.server.RequestDispatcherWrapper.forward(LogAspect.aj
(1k):99)
at org.apache.cactus.server.RequestDispatcherWrapper.dispatch179_forward
(LogAspect.aj(1k):104)
at org.apache.cactus.server.RequestDispatcherWrapper.around179_forward
(LogAspect.aj(1k):1149)
at org.apache.cactus.server.RequestDispatcherWrapper.forward(LogAspect.aj
(1k):99)
at com.vanguard.services.presentation.state.HtmlResponse.createResponse
(HtmlResponse.java:128)
at com.vanguard.services.presentation.state.HtmlResponse.createResponse
(HtmlResponse.java:92)
at web.corpcontent.vanguardviews.controller.VanViewsController.createResponse
(VanViewsController.java:260)
at com.vanguard.services.presentation.Activity.execute(Activity.java:283)
at com.vanguard.services.presentation.web.WebServlet.doGet(WebServlet.java:126)
at com.vanguard.TestServlet.TestVanViewsServlet.testGetMethod
(TestVanViewsServlet.java:61)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.cactus.AbstractTestCase.runServerTest(AbstractTestCase.java:332)
at org.apache.cactus.AbstractTestCase.runBareServerTest
(AbstractTestCase.java:235)
at org.apache.cactus.server.AbstractWebTestCaller.doTest
(AbstractWebTestCaller.java:149)
at org.apache.cactus.server.AbstractWebTestController.dispatch87_handleRequest
(LogAspect.aj(1k):125)
at org.apache.cactus.server.AbstractWebTestController.around87_handleRequest
(LogAspect.aj(1k):1149)
at org.apache.cactus.server.AbstractWebTestController.handleRequest
(LogAspect.aj(1k):101)
at org.apache.cactus.server.ServletTestRedirector.dispatch113_doPost
(LogAspect.aj(1k):123)
at org.apache.cactus.server.ServletTestRedirector.around113_doPost(LogAspect.aj
(1k):1149)
at org.apache.cactus.server.ServletTestRedirector.doPost(LogAspect.aj(1k):109)
at org.apache.cactus.server.ServletTestRedirector.dispatch112_doGet
(LogAspect.aj(1k):96)
at org.apache.cactus.server.ServletTestRedirector.around112_doGet(LogAspect.aj
(1k):1149)
at org.apache.cactus.server.ServletTestRedirector.doGet(LogAspect.aj(1k):92)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.servlet.engine.webapp.StrictServletInstance.doService
(ServletManager.java:827)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet._service
(StrictLifecycleServlet.java:167)
at com.ibm.servlet.engine.webapp.IdleServletState.service
(StrictLifecycleServlet.java:297)
at com.ibm.servlet.engine.webapp.StrictLifecycleServlet.service
(StrictLifecycleServlet.java:110)
at com.ibm.servlet.engine.webapp.ServletInstance.service
(ServletManager.java:472)
at com.ibm.servlet.engine.webapp.ValidServletReferenceState.dispatch
(ServletManager.java:1012)
at com.ibm.servlet.engine.webapp.ServletInstanceReference.dispatch
(ServletManager.java:913)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.handleWebAppDispatch
(WebAppRequestDispatcher.java:721)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.dispatch
(WebAppRequestDispatcher.java:374)
at com.ibm.servlet.engine.webapp.WebAppRequestDispatcher.forward
(WebAppRequestDispatcher.java:118)
at com.ibm.servlet.engine.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
at com.ibm.servlet.engine.srt.WebAppInvoker.handleInvocationHook
(WebAppInvoker.java:239)
at com.ibm.servlet.engine.invocation.CachedInvocation.handleInvocation
(CachedInvocation.java:67)
at com.ibm.servlet.engine.srp.ServletRequestProcessor.dispatchByURI
(ServletRequestProcessor.java:151)
at com.ibm.servlet.engine.oselistener.OSEListenerDispatcher.service
(OSEListener.java:315)
at com.ibm.servlet.engine.http11.HttpConnection.handleRequest
(HttpConnection.java:60)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:323)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:252)
at com.ibm.ws.util.CachedThread.run(ThreadPool.jav