Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3355

s:form tag render action URL with query string incorrectly

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.8
    • Fix Version/s: 2.2.1
    • Component/s: Plugin - Tags
    • Labels:
      None

      Description

      Normally,

      <s:form action="%

      {'Simple?a=123&b=234'}

      ">

      would be rendered as:

      <form action="/mysite/Simple.action?a=123&b=234" ... >

      But if the ".action" suffix is omitted in the request URL,
      (e.g. http://localhost/mysite/Simple )
      it will be rendered as:

      <form action="/mysite/Simple" ... >

      The query string is not appended.

      In org.apache.struts2.dispatcher.mapper.DefaultActionMapper#getUriFromActionMapping(),
      query string is appended only in case that the extension is provided.

        Attachments

        1. DefaultActionMapper.java.diff
          1.0 kB
          Iwasa Kazmi
        2. DefaultActionMapper-WW-3355.patch
          2 kB
          Lukasz Lenart

          Activity

            People

            • Assignee:
              lukaszlenart Lukasz Lenart
              Reporter:
              kzmi Iwasa Kazmi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: