jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: setURL question
Date Wed, 13 Feb 2002 17:20:00 GMT
Matt,

Yes, you're getting closer :-). Everything goes through the redirector.
The setURL is simply there in case you're manipulating the request URL
in your code under test and you're expecting some specific value.

WRT to your sequence diagram (a nice one BTW, it would be good to put it
on the cactus web site if you're ok to donate it), here are some
comments :

1/ If you're using JspTestCase, the corresponding Cactus redirector is
implemented as a JSP Page (not a servlet although I agree a JSP is a
servlet). Same, if you're using FilterTestCase, the corresponding Cactus
redirector is implemented as a Filter (not a servlet although a Filter
can be viewed as a servlet).

2/ Step 3 and 4 are correct. Connection goes to the Redirector.

3/ Step 6 is not completely correct. The redirector does passes to your
test case class the implicit objects (some are wrapped, like the
HttpServletRequest, some are not wrapped, like the HttpServletResponse).
But it has nothing to do with the client side WebRequest object.

4/ 8.1 is not correct. The loop is not done on the server side but on
the client side by the JUnit Test Runner.

5/ Step 10 is not "send test results" but "request test result" (no
plural, it is done test by test)

6/ Step 11 is not correct. The WebResponse object is created on the
client side in step 5 (that is the WebResponse you get in
endXXX(WebResponse))

Cheers,
-Vincent



> -----Original Message-----
> From: Matt Sullivan [mailto:matt.sullivan@bea.com]
> Sent: 13 February 2002 16:06
> To: Cactus Users List
> Subject: Re: setURL question
> 
> Vincent,
> 
> In trying to understand where I need a clue, I cobbled together the
> attached
> sequence diagram.  As I understand it I was working under the
assumption
> that
> the setURL in step 2.3 provided the Redirector Servlet with a URI that
> would be
> used to redirect the request on the server side.
> 
> However, it seems that I need to use a servlet that is invoked with
the
> wrapped
> WebRequest to handle the redirection on the server side.
> 
> Am I getting closer?
> 
> Thanks,
> Matt
> 
> Vincent Massol wrote:
> >
> > Matt,
> >
> > I'm not sure I understand correctly. Correct me if I'm wrong in my
> > understanding of what you're trying to achieve.
> >
> > The WebRequest.setURL() is used to simulate a request to the
specified
> > URL. It does not connect to it. The cactus client side always makes
a
> > HTTP connection to the Cactus Redirector. However, the servlet
implicit
> > objects (request, config, context, etc) are wrapped to return the
> > simulated URL when asked for it.
> >
> > Hope it helps.
> > -Vincent
> >
> > Note: I've not looked yet in the file you've provided as I wanted to
get
> > this clear before. I will it you tell me that this was also your
> > understanding. Thanks.
> >
> > > -----Original Message-----
> > > From: Matt Sullivan [mailto:matt.sullivan@bea.com]
> > > Sent: 12 February 2002 20:41
> > > To: Cactus Users List
> > > Subject: setURL question
> > >
> > > First, very cool tool!
> > >
> > > My environment:
> > >  WebLogic Server 6.1
> > >  WebLogic Commerce Server 3.5
> > >  JDK 1.3.1_01
> > >  Cactus 1.2 (2.2)
> > >
> > > My application code currently works.  When my code invokes
WebLogic
> > > Commerce
> > > Server Webflow I encounter no problems.  Typing the URI into a
browser
> > > directly
> > > works.  My attempts to invoke the same URI with setURL() has been
> > > unsuccessful.
> > >
> > > Any guidance is very much appreciated.
> > >
> > > The attached file contains debugging information.
> > >
> > > Thanks in advance,
> > > Matt
> >
> > --
> > To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message