In my JSP page, there is a hyperlink like "/app/myAction.do?value=2", What I want to do is --
1- Define two forwards for myAction: one to return to the page just displayed (jsp1), and the other to go to the new page (jsp2). Also, add a boolean property to your ActionForm to indicate whether to do the popup or not (doPopup) If the response is positive, set doPopup to true and forward to jsp1. Otherwise, forward to jsp2.
In jsp1, code something like the following:
This will cause the popup window to appear if the flag is set.
2 - Use AJAX to call the business logic on the server. Based on the response you receive, either open a popup window or submit the form.
I'm currently using the DWR Framework to handle AJAX calls, and I'm very happy with it.