Title: Parameter problem (VAJ 3.5.3, Junit 3.7, Cactus 1.1)
          This is the code of my doFlow function :
 
           public String doFlow(HttpServletRequest req, HttpServletResponse res)
           throws Throwable {
             String returnURL = null;
 
             super.doFlow(req, res) ;
 
             /*
              * retrieve page URL as parameter. Use 'NEXT' keyword to identify page.
              */
             try
             {
                  java.util.Enumeration enum = req.getParameterNames();
                  String key;
                  while (enum.hasMoreElements())
                  {
                       key = (String) enum.nextElement();
                       String value = req.getParameterValues(key)[0];
                       if (key.startsWith("NEXT")) 
                       returnURL = value;
                       CAT.log(ServletLogMsg.PAGECONTROLLER_PARAMETER, new String[]{key,req.getParameterValues(key)[0]});
                  }
             }
             catch (Throwable e)
             {
                  CAT.log(ServletLogMsg.PAGECONTROLLER_EXCEPTION, new String[]{e.toString()});
                  throw new IsabelException(e.toString());
             }
             // if action perform return null, we ask the pagecontroller which should be the next URL
             // localize the URL
             returnURL =  getLocalizer().localizeResource(returnURL, userContext.getLocale());
             CAT.log(ServletLogMsg.PAGECONTROLLER_LOCAL_URL, new String[]{returnURL});
             return returnURL;
            }
-----Original Message-----
From: Vincent Massol [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 03, 2001 4:44 PM
To: [EMAIL PROTECTED]
Subject: Re: Parameter problem (VAJ 3.5.3, Junit 3.7, Cactus 1.1)

Hi Fabien,
 
Well, you need to show us the doFlow() method in order to get help ... :-)
-Vincent
----- Original Message -----
Sent: Tuesday, July 03, 2001 2:42 PM
Subject: Parameter problem (VAJ 3.5.3, Junit 3.7, Cactus 1.1)

Hello,

I Have the following code :

public void beginDoFLow(ServletTestRequest theRequest) {
        theRequest.addParameter("NEXT","order/ord.jsp");
}

public void testDoFlow() {
        try
        {

       
   
                IsabelPageControllerTest servlet = new IsabelPageControllerTest();
                String url = servlet.doFlow(request, response);
       
                assertEquals("order/ord.jsp", (String)session.getValue("NEXT"));       
                assertEquals("/en/order/ord.jsp",url);
        }
        catch(Throwable e)
        {
                System.out.println(e.toString());
        }
}


and have the following error :

        junit.framework.AssertionFailedError: expected:<order/ord.jsp> but was:<null>

Someone can help me ?

Fabien

Reply via email to