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: Servlet Testing with Attributes
Date Sun, 14 Apr 2002 19:14:06 GMT


> -----Original Message-----
> From: laurent.duperval@masq.ca [mailto:laurent.duperval@masq.ca]
> Sent: 16 April 2002 15:05
> To: cactus-user@jakarta.apache.org
> Subject: Re: Servlet Testing with Attributes
> 
> On 16 Apr, Arathi.Bhaskar@itsindia.com wrote:
> >
> > Hi
> >
> > This is the code I have:
> >
> >      public void beginGetMethod(ServletTestRequest theRequest) {
> >           theRequest.addParameter("strScreenId", "5");
> >           theRequest.addParameter("strMinRoleId", "1");
> >      }
> >
> 
> Ahh, but unless I'm mistaken, this is for testing a POST request. 

No. All parameters are passed as GET parameters by default. If you wish
to pass as POST parameters it depends whether you're using Cactus 1.2 or
1.3

In 1.2 :

theRequest.addParameter("", "");
theRequest.setMethod("POST");

In 1.3 :

theRequest.addParameter("", "", WebRequest.POST_METHOD);


> If you
> want to test a GET request, you have to do what I said in my first
> message.

No, see above :-)

> But don't take my word for it, test it out first and if it fails, come
> back
> with your results. Someone better qualified will most likely jump in
with
> a
> proper response.
> 
> L

Thanks Laurent for trying ! :-). Please keep going and you'll soon be an
expert ! We do appreciate your help.

-Vincent

> 
> --
> Laurent Duperval <mailto:laurent.duperval@masq.ca>
> 
> In the war between men and women I prefer to follow the Bible's
advice:
> Love thine enemy.
> 
> 
> 
> --
> 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