I may be wrong, but it sounds a lot like you are misunderstanding the scope
of the request object. Apologies if I'm wrong - please ignore the following
egg-sucking tutorial!

The request objects life starts, on the server, when the servlet container
recieves a request from the user's browser. That request object is valid
until the end of all server side processing (i.e. until the page is rendered
on the browser). Nothing set in one request is visible in any other request.

In the example you give you are copying, whilst your page is being rendered,
one request scope attribute (index) to another request scope attribute
(identifier). What you aren't doing, as Rick says, is putting that bit of
information anywhere that can be used by a subsequent request. You need to
render the index in such a way that it is automatically sent back to the
server on subsequent requests.

I think the easiest way to do this would be to declare the index as a
property of your form bean. Your action could set this form property (rather
then setting the request scoped attribute as it dow now). The <html:hidden/>
struts tag will take care of preserving this value for subsequent requests.

Paul



> -----Original Message-----
> From: Tito Eritja [mailto:[EMAIL PROTECTED]
> Sent: 24 November 2004 19:41
> To: struts
> Subject: loosing request attributes from jsp to action
> 
> 
> Hi everybody.
> 
> We are working on a fleet trucking system. One user can have several
> windows opened, each window can manage several trucks. 
> 
> In order to manage this, the actionform has a Vector of this "window"
> information (and it's set in a session scope). 
> 
> As all this "windows" are managed by the same Action, we identify the
> window, setting an identifier in each request scope.
> 
> We get that identifier in jsp "window" with
> request.getAttribute("index") (with JSTL tags works fine), set it on
> request with <core:set var="identifier" scope="request" 
> value"index"/>,
> and submit the form to the action, The problem comes when 
> trying to get
> the identifier bean from this request in the action as the result is
> null.
> 
> Has anybody knows what I'm doing wrong? 
> 
> 
> tito
> 
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you 
are not the addressee indicated in this message (or responsible for delivery of 
the message to such person), you may not copy or deliver this message to 
anyone. In such case, you should destroy this message, and notify us 
immediately. If you or your employer does not consent to Internet email 
messages of this kind, please advise us immediately. Opinions, conclusions and 
other information expressed in this message are not given or endorsed by my 
Company or employer unless otherwise indicated by an authorised representative 
independent of this message.
 
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being 
transmitted via electronic mail attachments we cannot guarantee that 
attachments do not contain computer virus code.  You are therefore strongly 
advised to undertake anti virus checks prior to accessing the attachment to 
this electronic mail.  Axios Systems Ltd grants no warranties regarding 
performance use or quality of any attachment and undertakes no liability for 
loss or damage howsoever caused.


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

Reply via email to