jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harput, Vahan" <vahan.har...@siemens.com>
Subject pageContext.forward
Date Fri, 24 Nov 2006 17:24:06 GMT
Hi all,
 
I am trying to test a JSP page with a Cactus test similar to this one:
 
public class MyJspTest extends JspTestCase
{
  public void beginJspTest(WebRequest theRequest)
  {
    theRequest.setURL("localhost:8080", "/myapp", null, null,
"aParam=1");
  }
  
  public void testJspTest() throws Exception
  {
    pageContext.forward("test.jsp");
  }    
}
 
test.jsp uses a custom body tag which reads the query string like this:
 
((HttpServletRequest)pageContext.getRequest()).getQueryString())

I would have expected that the tag receives "aParam=1" as the result of
this call. However it receives 

"Cactus_TestMethod=testSidebar&Cactus_URL_ContextPath=%2Fpetstore&Cactus
_URL_Server=xxx%3A8080&Cactus_TestClass=com.sun.j2ee.blueprints.gui.Side
BarJspTest&Cactus_AutomaticSession=true&Cactus_URL_Protocol=http&Cactus_
Service=CALL_TEST" 

instead. It seems that the body tag sees the original pageContext object
instead of its wrapper. I would like to know if this is a Cactus bug.

I am using Cactus 1.7.2. with Sun App Server 8.2.

Any help would be appreciated.

Best regards,
Vahan Harput

Mime
View raw message