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

s:form tag render action URL with query string incorrectly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.8
    • 2.2.1
    • Plugin - Tags
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: