jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro" <ma-rami...@wiu.edu>
Subject getSession.getAttribute("someAttribute") returns NULL
Date Mon, 07 Jul 2003 14:39:21 GMT
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



Mime
View raw message