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

multiple forms on a single page renders wrong namespace in form action url

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.1.8.1
    • None
    • Core Actions
    • None

    Description

      so, this has been bugging me for a while, I decided to test it out. A JSP like that contains something like the following -

      <%@ taglib uri="/struts-tags" prefix="s" %>
      <html>
      <body>
      <h2>Hello World!</h2>
      <s:form action="foo" namespace="/">
      <s:submit />
      </s:form>
      <s:form action="bar" namespace="/baz">
      <s:submit />
      </s:form>
      </body>
      </html>

      When the page is rendered, the second form will not respect the /baz namespace. I created a sample app and will upload it here. I suspect the ServletUrlRenderer is the culprit, but I'll research more. If someone gets this fixed before me, that's fine, I wanted to post it to JIRA quick because this bug is a pain in my tuches.

      Attachments

        1. testForm.zip
          3 kB
          Wes Wannemacher

        Activity

          People

            Unassigned Unassigned
            wesw@wantii.com Wes Wannemacher
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: