Web tier: servlets, JSP, Web frameworks: Transaction-Token & sendRedirect()

  1. Transaction-Token & sendRedirect() (1 messages)

    Hi to all,
    we use the Struts Token solution to resolve the race-condition (which results e.g. by double-click).
    Now we have a problem with the sendRedirect(), because a sendRedirect() does not send the token in the URL.
    So the next token check failes.

    Is there any method or solution to send the token within the URL?

    We discovered this problem in the following situation:

    Every request in our application does the token-check. So, when we change from one action to another by forward-mapping, which is defined with 'redirect="true"' in the struts-config, the change failes, because the second request, redirected from the browser, does not contain the token.

    Regards Bodo
  2. Hi,

    the saveToken(), isValidToken(), resetToken() methods are provided by Struts framework and work with request object but in your case, you can't use the request object but the session object (for the sendRedirect). Perhaps you need to override the saveToken(), isValidToken() and resetToken() methods in a base action class.