Can you send the source of the Struct Action corresponding to "/addTopir" ?
(But anyway CactusStrutsTestCase is not part of the cactus project...)

Sebastien BRUNOT

-----Message d'origine-----
De : Alejandro [mailto:[EMAIL PROTECTED] 
Envoy� : lundi 7 juillet 2003 16:39
� : Cactus Users List
Objet : getSession.getAttribute("someAttribute") returns NULL


I have the following code as part of a CactusStrutsTestCase:

        addRequestParameter("subject", "MySubject");
        addRequestParameter("dateSubmitted", date);

        setConfigFile("/WEB-INF/struts-config.xml");
        setRequestPathInfo("/addTopic");

        actionPerform();

        verifyForward("success");

        assertEquals("MySubject", (String)
getSession().getAttribute("subject"));
        assertEquals(date, (String)
getSession().getAttribute("dateSubmitted"));

*** The code fails in the first assertEquals, because the
getSession.getAttribute() method returns NULL values, even though they were
written to the database.

Alejandro



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to