Return-Path: list-help: list-unsubscribe: List-Post: List-Id: Mailing-List: contact cactus-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list cactus-user@jakarta.apache.org Received: (qmail 28375 invoked from network); 9 Feb 2004 07:05:47 -0000 Received: from unknown (HELO spf13.us4.outblaze.com) (205.158.62.67) by daedalus.apache.org with SMTP; 9 Feb 2004 07:05:47 -0000 Received: from spf0.us4.outblaze.com (spf0.us4.outblaze.com [205.158.62.68]) by spf13.us4.outblaze.com (Postfix) with QMQP id 880CD180043E for ; Mon, 9 Feb 2004 07:05:59 +0000 (GMT) Received: (qmail 38900 invoked from network); 9 Feb 2004 07:05:59 -0000 Received: from unknown (HELO ws5-7.us4.outblaze.com) (205.158.62.156) by mailin.us4.outblaze.com with SMTP; 9 Feb 2004 07:05:59 -0000 Received: by ws5-7.us4.outblaze.com (Postfix, from userid 1001) id 630CF2B2B09; Mon, 9 Feb 2004 07:05:59 +0000 (GMT) Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Mailer: MIME-tools 5.41 (Entity 5.404) Received: from [203.129.226.146] by ws5-7.us4.outblaze.com with http for gnavsupe@india.com; Mon, 09 Feb 2004 15:05:59 +0800 From: "Dinesh N" To: cactus-user@jakarta.apache.org Date: Mon, 09 Feb 2004 15:05:59 +0800 Subject: Assesrtion Failed Error while JSP Testing X-Originating-Ip: 203.129.226.146 X-Originating-Server: ws5-7.us4.outblaze.com Message-Id: <20040209070559.630CF2B2B09@ws5-7.us4.outblaze.com> X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Friends, I am new to this technology. I am testing a jsp page which do some operation on java compiled class. 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 me...? 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: junit.framework.AssertionFailedError: This should be same expected same:<1> was not: at: arraytest.StringArrayJSPTest.teststringArray3 CAn anybody tell me what is the problem ? Thanking You, Ragards, 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