Thanks for this - it is what I suspected. The reason I want to do the   
client side forward is that I don't want the page resubmitted as it is   
creating records in the database. I noticed some stuff on struts token,   
is this the way I should go instead to prevent the resubmission and   
therefore solve the request attribute issue or is it 'safer' to go the   
client redirection and use the session attribute - I suppose it is 6 of   
one and half dozen of the other!

Any advice is welcome as I am pretty new to this
TIA
Conrad

Conrad Crampton J
Software Solutions
Kent Police
FHQ
11 Edinburgh Square
Sutton Road
Maidstone
Kent
ME15 9BZ

(01622 652869
19 2869


 ----------
From:  struts-user[SMTP:[EMAIL PROTECTED]
Sent:  21 March 2003 08:40
To:  "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject:   RE: Request attribute and forward redir



Yep. When you set redirect to true, then what happens is that the server
tells the browser to ask the server for the next page - thus its a client
side forward (and once youve rendered a response out to the client that
request is over) - thus you have a new request when the browser does as   
the
server requested and requests the url specified in the forward and the   
old
request is gone - and all its attributes with it.

If doing a server-side forward (ie: redirect=false) then the original
request and all its attributes and parameters are preserved - the server
simply forwards the request on to whatever resource is mapped to process   
the
url specified in the forward (not sure if filters are invoked. I think   
they
arent?) (Of course the client doesnt know about any of this internal
forwarding and so shows whichever url it thought it was getting.)

If a server side forward is no good for you, then the only other way is   
to
make use of the session - which as you mentioned can easily get   
inelegant.

 -----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: Friday, 21 March 2003 16:28
To: [EMAIL PROTECTED]
Subject: Request attribute and forward redirect




Hi,
When I set redirect to true for a forward mapping I lose my request
attribute in the resulting forwarded page. The only documented way of
retaining an object is to put it in the session or application scope (as
far as I can tell). Does anyone know of a way of putting this into the
request scope? Or do I have to put into session and then use a scriptlet
in my jsp to remove the session attribute once I have used the object?

Just looking for the 'correct' way really - it doesn't seem very elegant
to do what I have suggested.

TIA
Conrad

Conrad Crampton J
Software Solutions
Kent Police
FHQ
11 Edinburgh Square
Sutton Road
Maidstone
Kent
ME15 9BZ

(01622 652869
19 2869



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



begin 666 InterScan_Disclaimer.txt
M5&AI<R!%;6%I;"!A;[EMAIL PROTECTED](&%C8V]M<&%N>6EN9R!D;V-U;65N="AS*2!C
M;VYT86EN(&EN9F]R;6%T:6]N(&9R;[EMAIL PROTECTED]&AE($ME;[EMAIL PROTECTED];G1Y($-O;G-T
M86)U;&%R>[EMAIL PROTECTED]@@:7,@8V]N9FED96YT:6%L(&]R('!R:79I;&5G960N
M(" -"E1H92!I;F9O<FUA=&EO;B!I<R!I;G1E;F1E9"!T;R!B92!F;W(@=&AE
M(&5X8VQU<VEV92!U<V4@;[EMAIL PROTECTED]&AE(&EN9&EV:61U86PH<RD@;W(@8F]D:65S
M('1O('=H;VT@:70@:7,@861D<F5S<[EMAIL PROTECTED]@>6]U(&%R92!N;[EMAIL PROTECTED]&AE
M(&EN=&5N9&5D(')E8VEP:65N="!B92!A=V%R92!T:&%T(&%N>2!D:7-C;&]S
M=7)E+"!C;W!Y:6YG+"!D:7-T<FEB=71I;VX@;W(@=7-E(&]F('1H92!C;VYT
M96YT<R!O9B!T:&ES(&EN9F]R;6%T:6]N(&ES('!R;VAI8FET960N(" -"DEF
M('EO=2!H879E(')E8V5I=F5D('1H:7,@16UA:6P@:[EMAIL PROTECTED])R;W(@<&QE87-E
M(&YO=&EF>2!U<R!B>2!T96QE<&AO;F4@:6UM961I871E;'DN( T*5&AE(&-O
M<'ER:6=H="!I;B!T:&[EMAIL PROTECTED]&5N=',@;[EMAIL PROTECTED]&AI<R!E;6%I;"!A;[EMAIL 
PROTECTED]
M(&5N8VQO<W5R97,@:7,@=&AE('!R;W!E<G1Y(&]F($ME;[EMAIL PROTECTED];G1Y($-O
M;G-T86)U;&%R>2!A;[EMAIL PROTECTED]('5N875T:&]R:7-E9"!R97!R;V1U8W1I;VX@
M;W(@9&ES8VQO<W5R92!I<R!C;VYT<F%R>2!T;R!T:&4@<')O=FES:6]N<R!O
M9B!T:&[EMAIL PROTECTED]>7)I9VAT($1E<VEG;G,@86YD(%!A=&5N=',@06-T([EMAIL PROTECTED]
"#0H 
end


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

Reply via email to