You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Becky O'Sullivan (JIRA)" <ji...@apache.org> on 2008/05/29 23:45:05 UTC

[jira] Created: (WW-2661) ** does not match the backslach character when mapping wildcards in struts.xml

** does not match the backslach character when mapping wildcards in struts.xml
------------------------------------------------------------------------------

                 Key: WW-2661
                 URL: https://issues.apache.org/struts/browse/WW-2661
             Project: Struts 2
          Issue Type: Bug
          Components: Core Actions
    Affects Versions: 2.1.2
         Environment: Windows XP Professional & BEA Weblogic Server v10
            Reporter: Becky O'Sullivan


The Developers Guide (a great guide, by the way) states that two asterisks ( ** ) will match zero or more characters, including the slash character, for action names:   http://struts.apache.org/2.1.2/docs/wildcard-mappings.html

So I interpret that to mean:
<action  name="/edit**"   class="org.xyz.MyAction">
   <result>/myPage.jsp</result>
</action>

Would work for the following URLs:
http://myDomain/edit
http://myDomain/editabc
http://myDomain/edit/abc

It does work for all words that begin with edit (http://myDomain/editabc)
However, it is not allowing the slash character (http://myDomain/edit/abc)

When it encounters a slash after edit it assumes the following text is an action name and returns an error like this:
"There is no Action mapped for action name abc."

Did I misinterpret the page's explanation?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (WW-2661) ** does not match the backslach character when mapping wildcards in struts.xml

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Don Brown resolved WW-2661.
---------------------------

       Resolution: Not A Problem
    Fix Version/s:     (was: 2.1.3)
         Assignee: Don Brown

What you want to do is set the namespace for the actions in that package to "/web", then, everything should work correctly.

> ** does not match the backslach character when mapping wildcards in struts.xml
> ------------------------------------------------------------------------------
>
>                 Key: WW-2661
>                 URL: https://issues.apache.org/struts/browse/WW-2661
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.2
>         Environment: Windows XP Professional & BEA Weblogic Server v10
>            Reporter: Becky O'Sullivan
>            Assignee: Don Brown
>
> The Developers Guide (a great guide, by the way) states that two asterisks ( ** ) will match zero or more characters, including the slash character, for action names:   http://struts.apache.org/2.1.2/docs/wildcard-mappings.html
> So I interpret that to mean:
> <action  name="/edit**"   class="org.xyz.MyAction">
>    <result>/myPage.jsp</result>
> </action>
> Would work for the following URLs:
> http://myDomain/edit
> http://myDomain/editabc
> http://myDomain/edit/abc
> It does work for all words that begin with edit (http://myDomain/editabc)
> However, it is not allowing the slash character (http://myDomain/edit/abc)
> When it encounters a slash after edit it assumes the following text is an action name and returns an error like this:
> "There is no Action mapped for action name abc."
> Did I misinterpret the page's explanation?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-2661) ** does not match the backslach character when mapping wildcards in struts.xml

Posted by "Becky O'Sullivan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43994#action_43994 ] 

Becky O'Sullivan commented on WW-2661:
--------------------------------------

Unfortunately, adding 

<constant name="struts.enable.SlashesInActionNames" value="true"/> 

breakes my filter dispatcher (/web/*) because I had removed the .action extension from struts actions. We're basically trying to make the URL as easy to understand as possible for our end users. 

So with .. 
a filter dispatcher /web/* 
an action name <action name="/content**" ...> 
and <constant name="struts.enable.SlashesInActionNames" value="true"/> in struts.xml 

It no longer recognizes any actions: 
/web/content 
/web/content/abc 
/web/contentabc 

All produce the same error: "There is no Action mapped for action name /web/ ... " 


> ** does not match the backslach character when mapping wildcards in struts.xml
> ------------------------------------------------------------------------------
>
>                 Key: WW-2661
>                 URL: https://issues.apache.org/struts/browse/WW-2661
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.2
>         Environment: Windows XP Professional & BEA Weblogic Server v10
>            Reporter: Becky O'Sullivan
>
> The Developers Guide (a great guide, by the way) states that two asterisks ( ** ) will match zero or more characters, including the slash character, for action names:   http://struts.apache.org/2.1.2/docs/wildcard-mappings.html
> So I interpret that to mean:
> <action  name="/edit**"   class="org.xyz.MyAction">
>    <result>/myPage.jsp</result>
> </action>
> Would work for the following URLs:
> http://myDomain/edit
> http://myDomain/editabc
> http://myDomain/edit/abc
> It does work for all words that begin with edit (http://myDomain/editabc)
> However, it is not allowing the slash character (http://myDomain/edit/abc)
> When it encounters a slash after edit it assumes the following text is an action name and returns an error like this:
> "There is no Action mapped for action name abc."
> Did I misinterpret the page's explanation?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (WW-2661) ** does not match the backslach character when mapping wildcards in struts.xml

Posted by "Don Brown (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/struts/browse/WW-2661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Don Brown updated WW-2661:
--------------------------

    Fix Version/s: 2.1.3

> ** does not match the backslach character when mapping wildcards in struts.xml
> ------------------------------------------------------------------------------
>
>                 Key: WW-2661
>                 URL: https://issues.apache.org/struts/browse/WW-2661
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.2
>         Environment: Windows XP Professional & BEA Weblogic Server v10
>            Reporter: Becky O'Sullivan
>             Fix For: 2.1.3
>
>
> The Developers Guide (a great guide, by the way) states that two asterisks ( ** ) will match zero or more characters, including the slash character, for action names:   http://struts.apache.org/2.1.2/docs/wildcard-mappings.html
> So I interpret that to mean:
> <action  name="/edit**"   class="org.xyz.MyAction">
>    <result>/myPage.jsp</result>
> </action>
> Would work for the following URLs:
> http://myDomain/edit
> http://myDomain/editabc
> http://myDomain/edit/abc
> It does work for all words that begin with edit (http://myDomain/editabc)
> However, it is not allowing the slash character (http://myDomain/edit/abc)
> When it encounters a slash after edit it assumes the following text is an action name and returns an error like this:
> "There is no Action mapped for action name abc."
> Did I misinterpret the page's explanation?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-2661) ** does not match the backslach character when mapping wildcards in struts.xml

Posted by "Dave Newton (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43991#action_43991 ] 

Dave Newton commented on WW-2661:
---------------------------------

Did you enable slashes in action names?

(Not sure if that will help you solve whatever it is you're trying to do, but it's controllable, so it's worth a shot.)

See the following URLs:

http://struts.apache.org/2.x/docs/action-configuration.html
https://issues.apache.org/struts/browse/WW-1383


> ** does not match the backslach character when mapping wildcards in struts.xml
> ------------------------------------------------------------------------------
>
>                 Key: WW-2661
>                 URL: https://issues.apache.org/struts/browse/WW-2661
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.2
>         Environment: Windows XP Professional & BEA Weblogic Server v10
>            Reporter: Becky O'Sullivan
>
> The Developers Guide (a great guide, by the way) states that two asterisks ( ** ) will match zero or more characters, including the slash character, for action names:   http://struts.apache.org/2.1.2/docs/wildcard-mappings.html
> So I interpret that to mean:
> <action  name="/edit**"   class="org.xyz.MyAction">
>    <result>/myPage.jsp</result>
> </action>
> Would work for the following URLs:
> http://myDomain/edit
> http://myDomain/editabc
> http://myDomain/edit/abc
> It does work for all words that begin with edit (http://myDomain/editabc)
> However, it is not allowing the slash character (http://myDomain/edit/abc)
> When it encounters a slash after edit it assumes the following text is an action name and returns an error like this:
> "There is no Action mapped for action name abc."
> Did I misinterpret the page's explanation?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (WW-2661) ** does not match the backslach character when mapping wildcards in struts.xml

Posted by "Becky O'Sullivan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/struts/browse/WW-2661?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43992#action_43992 ] 

Becky O'Sullivan commented on WW-2661:
--------------------------------------

Oh!  I completely missed that.
Perhaps it would be a good idea to make a note of it in the wildcard-mappings page.
I'll give it a try and, if it works, see if I can close this ticket.

> ** does not match the backslach character when mapping wildcards in struts.xml
> ------------------------------------------------------------------------------
>
>                 Key: WW-2661
>                 URL: https://issues.apache.org/struts/browse/WW-2661
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Actions
>    Affects Versions: 2.1.2
>         Environment: Windows XP Professional & BEA Weblogic Server v10
>            Reporter: Becky O'Sullivan
>
> The Developers Guide (a great guide, by the way) states that two asterisks ( ** ) will match zero or more characters, including the slash character, for action names:   http://struts.apache.org/2.1.2/docs/wildcard-mappings.html
> So I interpret that to mean:
> <action  name="/edit**"   class="org.xyz.MyAction">
>    <result>/myPage.jsp</result>
> </action>
> Would work for the following URLs:
> http://myDomain/edit
> http://myDomain/editabc
> http://myDomain/edit/abc
> It does work for all words that begin with edit (http://myDomain/editabc)
> However, it is not allowing the slash character (http://myDomain/edit/abc)
> When it encounters a slash after edit it assumes the following text is an action name and returns an error like this:
> "There is no Action mapped for action name abc."
> Did I misinterpret the page's explanation?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.