One of the possible solutions is to keep track of the user intercepting their URLs. You might do it in the authentication interceptor.
String queryString = request.getQueryString();
session.put("savedUrl", request.getRequestURI()+(queryString==null?"":("?"+queryString)));
use the global result with dynamic parameter
@Results({
@Result(name = "return", type = "redirect", location = "${savedUrl}")
})
after login check the session for savedUrl
and return result "return"
. Assumed providing getter for the dynamic parameter.