Hi Ryan,

This thread is a bit old, sorry... Have you been to solve your problem in
the end?

Thanks
-Vincent

> -----Original Message-----
> From: Ryan Levering [mailto:[EMAIL PROTECTED]
> Sent: lundi 6 septembre 2004 22:02
> To: Cactus Users List
> Subject: RE: endXXX problems
> 
> Yeah, it doesn't make sense to me either, that's exactly what I thought.
> They are both being executed within browser using ServletTestRunner
> running
> on Tomcat 5, Cactus 1.6.  Here's a funnier example:
> 
> public class MyTestCase extends JspTestCase {
> 
>     public void testJSP() throws Exception {
>         pageContext.include("/CurrentPageTagTests.jsp");
>     }
>     public void endJSP(WebResponse response) throws Exception {
>       String output = response.getText();
>         try {
>               throw new Exception(response.getText());
>         } catch (Exception e) {
>               assertTrue("Message should not be empty",
> e.getMessage().length()
> != 0);
>         }
> 
>     }
> 
>     public void testJSP2() throws Exception {
>         pageContext.include("/CurrentPageTagTests.jsp");
>     }
>     public void endJSP2(WebResponse response) throws Exception {
>       throw new Exception(response.getText());
>     }
> }
> 
> This is the exact test case I run and I get a Failure and an Exception
> with
> a bunch of text in it.  :)
> 
> Ryan
> 
> 
> -----Original Message-----
> From: Vincent Massol [mailto:[EMAIL PROTECTED]
> Sent: Monday, September 06, 2004 1:16 PM
> To: 'Cactus Users List'
> Subject: RE: endXXX problems
> 
> 
> Hi Ryan,
> 
> In both your examples, the assertion is performed on the client side (in
> endJSP()) so I don't think there is a server side vs client side stuff.
> 
> I don't see how the 2 tests are different they both call the same
> response.getText() method so there cannot be any difference. Maybe you're
> not executing both tests with the same environment?
> 
> Thanks
> -Vincent
> 
> > -----Original Message-----
> > From: Ryan Levering [mailto:[EMAIL PROTECTED]
> > Sent: lundi 6 septembre 2004 18:42
> > To: [EMAIL PROTECTED]
> > Subject: endXXX problems
> >
> > Ok, I saw this was a thread back in April, but I am still stumped as it
> > seems like no one discovered the underlying issue.  Obviously I'm
> setting
> > something up wrong.  The issue is that response.getText is returning
> empty
> > strings.  But the weird thing is that it doesn't always do it.  For
> > example:
> >
> > public void testJSP() {
> >     pageContext.include("/test.jsp");
> > }
> > public void endJSP(WebResponse response) throws Exception {
> >     throw new Exception(response.getText());
> > }
> >
> > will throw an exception with the contents correct.
> >
> > However:
> >
> > public void testJSP() {
> >     pageContext.include("/test.jsp");
> > }
> > public void endJSP(WebResponse response) throws Exception {
> >     assertTrue(response.getText().length() != 0);
> > }
> >
> > will fail.  So I'm missing something with server vs. client side calling
> > of
> > assertions.
> >
> > Any help?
> >
> > Ryan Levering
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to