Struts 2
  1. Struts 2
  2. WW-3355

s:form tag render action URL with query string incorrectly

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major 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.

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

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development