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

s:form fails to output context/namespace when used with regex pattern matcher

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 2.3.16.3
    • Fix Version/s: 2.3.28
    • Component/s: Core Actions
    • Labels:
      None

      Description

      Just changed my config to enable regex in action names. In struts.xml:

      <constant name="struts.patternMatcher" value="regex" />
      

      Works great! But as a side effect, s:forms no longer outputs the correct path to my actions.

      The code below:

      <s:form id="uploadImage" action="uploadImagesSave!execute" enctype="multipart/form-data" method="post">
      

      used to output:

      <form id="uploadImage" action="/mycontext/news/uploadImagesSave!execute.action" method="post" enctype="multipart/form-data">
      

      but now I only get:

      <form id="uploadImage" action="uploadImagesSave!execute.action" method="post" enctype="multipart/form-data">
      

      The context and namespace is stripped out. I verified that just changing back the patternMatcher fixes the issue. I'm using struts 2.3.16.3. Anyone has any ideas on how to fix it?

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bjorkman Peter Björkman
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: