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]

Reply via email to