Hello- 

I'm just getting started w/ Cactus. I have gotten a
few servlet/jsp tests working, so i think i've got
everything setup right. 

My current question has to do w/ servlet redirects.
I'd like to test that my servlet is correctly
redirecting to the error page if the wrong parameters
are passed in the request. So I do this: 

public void testCreateWithNoParams() throws Exception
{
  CreateWorkflowServlet servlet = new
CreateWorkflowServlet();
  servlet.service(request, response);
}

public void endCreateWithNoParams(WebResponse resp)
throws Exception {
  String text = resp.getText();
  System.out.println("response page = " + text );
  // do some asserts on the page text to check that
  // it's the error page. 
}

When i run it, i'm getting a 302 error page back, but
what I want is the page after that. What am i doing
wrong? (i'm using tomcat 4.0 if that makes a
difference.)

Thanks a lot for any tips.

-pgm


__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

Reply via email to