Yeah Rakesh it worked.for endTablesJSP, endHelloJSP, but didn't work for
endOut. It might be that
since I have used two pageContexts in the same method ( testOut() ), it
didn't work.
Dhar
----- Original Message -----
From: "Rakesh Bhalla" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 28, 2001 1:49 PM
Subject: Re: A doubt in one of the samples that is being used in Cactus
> Hello,
>
> > SCENARIO 2:
> >
> > public void testHelloJSP() throws IOException, ServletException {
> > logger.debug("Beginning of testHelloJSP()");
> > session.setAttribute("name" , "BLUE" ) ;
> > pageContext.forward("/hello.jsp");
> > logger.debug("End of testHelloJSP()");
> > assertEquals("BLUE" , session.getAttribute("name"));
> > }
> >
> > public void testTablesJSP() throws IOException, ServletException {
> > logger.debug("Beginning of testTablesJSP()");
> > session.setAttribute("name" , "Dharnidhar Vemuri" ) ;
> > session.setAttribute("age" , "16" ) ;
> > pageContext.forward("/Tables.jsp");
> > logger.debug("End of testTablesJSP()");
> > assertEquals("Dharnidhar Vemuri" , session.getAttribute("name"));
> > }
> >
> > public void testOut() throws IOException, ServletException {
> > logger.debug("Beginning of testHelloJSP()");
> > session.setAttribute("name" , "BLUE" ) ;
> > pageContext.forward("/hello.jsp");
> > logger.debug("End of testHelloJSP()");
> > assertEquals("BLUE" , session.getAttribute("name"));
> >
> > logger.debug("Beginning of testTablesJSP()");
> > session.setAttribute("name" , "Dharnidhar Vemuri" ) ;
> > session.setAttribute("age" , "16" ) ;
> > pageContext.forward("/Tables.jsp");
> > logger.debug("End of testTablesJSP()");
> > assertEquals("Dharnidhar Vemuri" , session.getAttribute("name"));
> > }
> >
> > public void endOut(HttpURLConnection huc )throws IOException ,
> > ServletException {
> > System.out.println( AssertUtils.getResponseAsString(huc) );
> > }
> > }
> Cactua architecture goes something like this. Lets say we have a
> test case by name XXX , we write 3 methods , beginXXX , testXXX,
> endXXX . Now beginXXX and endXXX gets executed on the client, before
> the request and after the response respectively. Only the method
> testXXX gets executed on the server. Your eg, says that there are 3
> testXXX cased but only one corresponding endXXX i.e. endOut .
> Now if you are looking at the case testTablesJsp then if you want
> the response output you may want to add another method, endTablesJsp
> so that it gets executed on the client.
>
> beginXXX --- > testXXXX
> |
> endXXX <---------
>
>
> [ Client] [Server]
>
>
> Probably you may like to modify it and report back what happened next.
>
> =====
> Thanks.
> Rakesh Bhalla.
>
> __________________________________________________
> Do You Yahoo!?
> Listen to your Yahoo! Mail messages from any phone.
> http://phone.yahoo.com