Hi, I am having a ton of problems trying to verify the output of a jsp.
I assumed I could just use the theResponse.getText() method to get the
output of the jsp, but it doesn't seem to be working, it comes out with
an empty string instead of some content.
Here is my code:
-----snip------
public class TestLoginJsp extends JspTestCase {
public TestLoginJsp( String testName )
{
super(testName);
}
public static Test suite()
{
return new TestSuite(TestLoginJsp.class);
}
public void setUp()
throws Exception
{
super.setUp();
}
public void beginJsp(WebRequest theRequest)
{
System.err.println("FOO:beginJsp"); // -> "FOO:beginJsp"
theRequest.setURL("localhost", "/something", "/something/LoginJSP",
null, null);
theRequest.addCookie("test", "cookievalue");
}
public void testJsp()
{
LoginJSP servlet = new LoginJSP();
assertEquals(1, 1);
}
public void endJsp(org.apache.cactus.WebResponse theResponse)
{
System.err.println("FOO:endJsp"); // -> "FOO:endJsp"
System.err.println(theResponse.getText()); // -> ""
System.err.println(theResponse.getStatusCode()); // -> 200
System.err.println(theResponse.getCookie("test")); // -> null
}
public void tearDown()
throws Exception
{
super.tearDown();
}
}
-----end snip------
Any idea what the problem could be?
Login.jsp is precompiled into LoginJSP
Cactus version: 1.5
Tomcat version: 4.1.30
Ant version: 1.6.1
OS: Debian GNU/Linux
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]