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:<null>
junit.framework.AssertionFailedError: This should be same expected same:<1> was
not:<null>
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]