OK,
Thanks everyone for your help.
The correct approach is:
Java:
request.setAttribute("myThing", myThing);
JSP:
Thanks again
On Tue, 04 Jan 2005 18:22:32 -0800, Curtis Taylor <[EMAIL PROTECTED]> wrote:
> Hi,
>
> You *cannot* directly add parameters to an http request inside an Action
> cl
Hi,
You *cannot* directly add parameters to an http request inside an Action
class. You *can* add attributes to the request context (that's what
HttpServletRequest was designed for).
So, in your JSTL-aware page, access your request *attribute*:
or
HTH,
Curtis
dsarris wrote:
I do not thing th
> -Original Message-
> From: dsarris [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, January 04, 2005 8:19 AM
> To: Struts Users Mailing List; [EMAIL PROTECTED]
> Subject: Re: Set request parameters in servlet through action
>
>
>
>
> I do not thing that Ho
I do not thing that Hollaway solution is the correct one. I do not
pass it to the request parameter list. As brenmcguire stated, I can
only set an attribute in the Request (not the parameters).
Thus, what is the equivalent for retrieving the attribute in my JSP page?
OR
-
rg
Subject: Re: Set request parameters in servlet through action
I am using the JSTL:core tag libs ar a replacement of the
"struts-bean"
tag.
Thus, is the following equivalent?
JSP:
Uh... I don't know, I never used JSTL. Sorry but you have to try and
test
:-P
Just remember that &q
Yep, that will do it :-)
+ If there isnt such an attribute in the request it will also look in
the session and iirc the servlet context too...
[EMAIL PROTECTED] wrote:
I am using the JSTL:core tag libs ar a replacement of the "struts-bean"
tag.
Thus, is the following equivalent?
JSP:
Uh... I do
This should be equivalent:
Shed.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 04, 2005 9:28
To: user@struts.apache.org
Subject: Re: Set request parameters in servlet through action
> I am using the JSTL:core tag libs ar a replacement
> I am using the JSTL:core tag libs ar a replacement of the "struts-bean"
tag.
>
> Thus, is the following equivalent?
>
> JSP:
>
Uh... I don't know, I never used JSTL. Sorry but you have to try and test
:-P
Just remember that "request.setAttribute" sets a bean at request scope.
--
On Tue, 4 Jan 2005 14:37:54 +0100, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> >
> > Thus, if I set an attribute using the HttpServletRequest.setAttribute,
> > how can I retrieve it my JSP page?
> > I know that all these can be very easy using an ActionForm, but I do
> > not want to create an Ac
>
> Thus, if I set an attribute using the HttpServletRequest.setAttribute,
> how can I retrieve it my JSP page?
> I know that all these can be very easy using an ActionForm, but I do
> not want to create an ActionForm for just a plain String attribute.
>
Supposing in the Java code:
String myThin
On Tue, 4 Jan 2005 13:31:35 +0100, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
>
> > how can I add a request parameter inside an action execute method? Do
> > I have to use an ActionForm or it is an easiest way to do it?
> >
>
> You cannot set a new parameter once a http request has been submitt
> how can I add a request parameter inside an action execute method? Do
> I have to use an ActionForm or it is an easiest way to do it?
>
You cannot set a new parameter once a http request has been submitted, but
you can get parameters directly via the object "request", passed in the
"execute" me
Hi,
how can I add a request parameter inside an action execute method? Do
I have to use an ActionForm or it is an easiest way to do it?
chipix
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL P
13 matches
Mail list logo