Uploaded image for project: 'Struts 1'
  1. Struts 1
  2. STR-3001

LookupDispatchAction Problem while clicking the refresh button on browser with Chinese Characters

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Incomplete
    • None
    • None
    • Extras
    • None
    • Server: Tomcat 5

    Description

      I am i18n developing a web application with struts that support 2 language (Eng & Traditional Chinese).

      I am using 2 hyper link for switching the language, and the both link are work fine by just clicking them. But when when I click for Traditional Chinese and the press the browser refresh button, the following exception occur:

      javax.servlet.ServletException: Action[/ChangeLanguageAction] missing resource '&#32321&#39636&#20013&#25991' in key method map
      org.apache.struts.actions.LookupDispatchAction.getLookupMapName(LookupDispatchAction.java:240)
      org.apache.struts.actions.LookupDispatchAction.getMethodName(LookupDispatchAction.java:281)
      org.apache.struts.actions.LookupDispatchAction.execute(LookupDispatchAction.java:158)
      org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
      org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
      org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
      org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      com.vh.util.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:104)

      But if press the refresh button after click the Traditional Chinese hyper link TWICE (or more), it will be no problem.
      And I have found that the generated parameters are different from by the clicking the Traditional Chinese hyper link.

      By first time click the hyperlink:
      http://localhost/myproject/ChangeLanguageAction.do?method=%26%2332321%26%2339636%26%2320013%26%2325991
      The second time:
      http://localhost/myproject/ChangeLanguageAction.do?method=%E7%B9%81%E9%AB%94%E4%B8%AD%E6%96%87

      I am look forward to have the resolve solution. thanks!

      Attachments

        Activity

          People

            Unassigned Unassigned
            angus.lipsey Angus Lipsey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: