I'm looking for guidelines for how to best implement web page navigation logic for a Spring based web application. For example: I have a web page 'C' where if I click ok, I want flow to return to page 'A' if that was the previous page, or page 'B' if that was the previous page. I am currently using hidden fields on a page to track from which page I arrived...but I think there must be a better way...
Asked
Active
Viewed 1,554 times
2
-
does the referrer header work? – Kevin May 08 '11 at 05:17
2 Answers
0
You can use flash scope bean for saving the view Url from which you are redirected.
You can read about flash scope from this page:
http://blog.smartkey.co.uk/2011/01/implementing-flash-scope-in-java-web-applications/
See me response from this post. it Explains how to implement Flash Scope in SPring MVC environment.
with this scope you can alway retrieve the URL form which you will redirected and then build link form the value retrieved.
Hope it helps.

Community
- 1
- 1

danny.lesnik
- 18,479
- 29
- 135
- 200
0
My suggestion would be to use Spring Web Flow (http://www.springsource.org/webflow).
It's intended to do exactly what you want. Control the flows between pages.
I start using it a couple of month ago and I love it.

Alexandru Luchian
- 2,760
- 3
- 29
- 41