On Sun, 2002-09-15 at 12:01, Luke Opperman wrote:
> 3. Webware: Similar to your solution (storing the 'back' page in a session
> variable), but by having each servlet set this at the end of response() (or
> wherever) to itself. This removes the client from the decision, and could allow
> for just 'milestone' links: for instance, if you have a multi-page form, and
> wanted to have a 'Back to Before this form' link, you could simply override the
> save-to-session function with a pass on those unimportant servlets.
The problem with using the session is that it will mess up anyone
browsing with multiple windows. I don't know how many people do that --
I do it constantly, but I'm probably the exception.
You could embed the referring URL in the link, e.g.:
"/feedback?from=/url/to/here". This will work reliably, but requires
that the original page knows that you want that information. If you use
HTTP_REFERER instead, I'd suggest that you then keep that URL in a
hidden field, and not put it in the session -- then two forms open at
the same time won't step on each other.