Is there a way to detect the "back" button for Java EE web apps?

495 Views Asked by At

Environment:

  • Spring latest
  • Using Spring Web flows 2
  • Spring MVC
  • Jetty server

In the situation where evoking the webflow with required parameters missing I want to print a message for the developers (I have done this by subclassing FlowController). The problem comes in when the webflow is complete and the user hits the back button. In this case I would like to redirect to another page(static).

If this were in the flow I would use a listener to perform this action, but the webflow has ended. So pressing the back button has the effect of trying to start another webflow.

Is there a way to detect the "back button" outside of the webflow?

Or any other suggestions would be helpful.

1

There are 1 best solutions below

1
On

Rather than detecting the back-navigation, instead set up the last part of the webflow to not start a new flow, but instead do the redirect.