You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Lukasz Lenart (JIRA)" <ji...@apache.org> on 2016/01/29 18:08:39 UTC

[jira] [Commented] (WW-4417) s:form fails to output context/namespace when used with regex pattern matcher

    [ https://issues.apache.org/jira/browse/WW-4417?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15123785#comment-15123785 ] 

Lukasz Lenart commented on WW-4417:
-----------------------------------

I'm marking this to be fixed in 2.3.25 but just to check if adding {{namespace}} attribute will fix the issue

> s:form fails to output context/namespace when used with regex pattern matcher
> -----------------------------------------------------------------------------
>
>                 Key: WW-4417
>                 URL: https://issues.apache.org/jira/browse/WW-4417
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.3.16.3
>            Reporter: Peter Björkman
>             Fix For: 2.3.25
>
>
> Just changed my config to enable regex in action names. In struts.xml:
> {code:xml}
> <constant name="struts.patternMatcher" value="regex" />
> {code}
> Works great! But as a side effect, s:forms no longer outputs the correct path to my actions.
> The code below:
> {code:html}
> <s:form id="uploadImage" action="uploadImagesSave!execute" enctype="multipart/form-data" method="post">
> {code}
> used to output:
> {code:html}
> <form id="uploadImage" action="/mycontext/news/uploadImagesSave!execute.action" method="post" enctype="multipart/form-data">
> {code}
> but now I only get:
> {code:html}
> <form id="uploadImage" action="uploadImagesSave!execute.action" method="post" enctype="multipart/form-data">
> {code}
> 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?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)