You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-user@jakarta.apache.org by Russ Baker <rb...@NETdelivery.com> on 2001/11/05 18:17:15 UTC

RE: Trouble getting a request's attribute

Hello,

sorry for getting back to this so late.  My original question was more
directed at the endXXX method from the WebResponse object, but I found that
this wasn't the place for it.  After I called the service method in the
testXXX method, I can get the attribute I needed from the
request.getAttribute method.  I just thought that the endXXX was the place
to check, but apparently I was wrong.

-Russ

-----Original Message-----
From: Vincent Massol [mailto:vmassol@octo.com]
Sent: Saturday, October 27, 2001 3:42 PM
To: cactus-user@jakarta.apache.org
Subject: Re: Trouble getting a request's attribute




----- Original Message -----
From: "Russ Baker" <rb...@NETdelivery.com>
To: <ca...@jakarta.apache.org>
Sent: Wednesday, October 24, 2001 9:44 PM
Subject: Trouble getting a request's attribute


> Hello again,
>
> This one is for real, I promise...  I am setting something in the request
> attribute (actually putting a vector into it)

I am not sure I am following you. Do you mean you're using the
HttpServletRequest.setAttribute() method (in which case this method should
be called in testXXX()) or do you mean you're using
WebRequest.addParameter() method (in beginXXX()) ? Or something else ?

> and am trying to get the
> object back out of the request.  The WebRequest object does not allow you
to
> get the attribute,

the WebRequest object is only accessible in the beginXXX() method and is
used to send HTTP parameters to the test (i.e. fill HttpServletRequest).

> are there any other objects/methods to use to get this
> out?

maybe HttpServletRequest.getAttribute()

>
> Thanks,
>
> Russ Baker

-Vincent

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>