pageContext.forward

"Harput, Vahan" <[email protected]>
Newsgroups gmane.comp.jakarta.cactus.user
Message-ID <1B8AF39CACF71744BE07006131091BBE584720@atnets15na.ww300.siemens.net>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.