Struts Multilang Problem


Web tier: servlets, JSP, Web frameworks: Struts Multilang Problem

  1. Struts Multilang Problem (3 messages)

    I'd like to implement a multilingual web app with Struts.
    There are lang image buttons on all jsp pages.
    I'd like to implement in the way that when user clicks the button, the current page will be refreshed(resubmitted) and the text on that page will be converted into that of the selected lang.
    However, I cannot figure out a way to prevent resubmission of HTML POST Form.
    For example, in the bank account withdrawal scenario, user inputted an amount and clicked submit button to POST the form. An acknowledgment jsp page is then displayed with the inputted withdrawal amount, current balance, and a timestamp generated in Struts Action. At this point, user clicks the lang button to switch lang and a from resubmission will be triggered. How can I redisplay this acknowledgment jsp page with all dynamic information displayed correctly without duplicating the withdrawal action?

    Thanks in advance.

    Threaded Messages (3)

  2. Struts Multilang Problem[ Go to top ]

    Could someone kindly offer me some opinions?
    Thanks in advance.
  3. Struts Multilang Problem[ Go to top ]

    I would rethink your decision to allow language changes at any point in your application.
    If you think about it, why on earth would somebody want to change language half-way through a transaction.

    I'd limit the ability to change languages to a few selected (and sensible) places in the application - such as the login page and the main menu.

    Secondly, as far as dealing with duplicate submissions is concerned, may I suggest that you check out the technique discussed in this article...

    Good luck
  4. Struts Multilang Problem[ Go to top ]

    Thanks Bob.
    I will take your opinion to limit the ability to change languages at only some places.