You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by BRUNOT Sébastien <Se...@vizzavi.fr> on 2003/07/07 17:34:03 UTC
RE : getSession.getAttribute("someAttribute") returns NULL
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:ma-ramirez@wiu.edu]
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: cactus-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: cactus-user-help@jakarta.apache.org