Hi,
What's the correct way to test that the request
parameters are cleared after a sendRedirect() is
executed by the servlet. Should this be tested in
the testXXX() method?
I have the following code:
public void beginRedirect(ServletTestRequest
theRequest)
{
System.out.println("in beginRedirect");
theRequest.addParameter("name2", "xyz");
}
public void testRedirect() throws Exception
{
System.out.println("in testRedirect");
SampleServlet servlet = new SampleServlet();
System.out.println("name2= "+
request.getParameter("name2"));
servlet.doRedirect(request, response, config);
System.out.println("name22= "+
request.getParameter("name2"));
}
The request parameters are present even after the call
to doRedirect().
Thanks for any ideas.
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/