jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dinesh N" <gnavs...@india.com>
Subject Assesrtion Failed Error while JSP Testing
Date Mon, 09 Feb 2004 07:05:59 GMT
Hi Friends,
    I am new to this technology. I am testing a jsp page which do some operation on java compiled

Now i have created some test case like:

public void teststringArray3()
		 System.out.println("Value is "+session.getServletContext().getAttribute("stringArray3Count"));
		 assertSame("This should be same","1",session.getServletContext().getAttribute("stringArray3Count"));

****stringArray3Count is an veriable which is set to proper value in JSP Page.

But i am not able to access the Value in Test class. It is returning NULL. CAn anybody help
Please let me know where is problem in my Code or what..?

I also tried with. pageContext.include("/test.jsp");
and then pageContext.getAttribute(stringArray3Count());
But still it returns null.

After running the Result is:

   This should be same expected same:<1> was not:<null>

junit.framework.AssertionFailedError: This should be same expected same:<1> was not:<null>

CAn anybody tell me what is the problem ?

Thanking You,

Dinesh N.

India.com free e-mail - www.india.com. 
Check out our value-added Premium features, such as an extra 20MB for mail storage, POP3,
e-mail forwarding, and ads-free mailboxes!

Powered by Outblaze

View raw message