You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Kris Coolsaet (JIRA)" <ji...@apache.org> on 2008/03/04 10:14:07 UTC

[jira] Created: (WW-2529) Wildcard mappings match not as expected

Wildcard mappings match not as expected
---------------------------------------

                 Key: WW-2529
                 URL: https://issues.apache.org/struts/browse/WW-2529
             Project: Struts 2
          Issue Type: Bug
          Components: XML Configuration
            Reporter: Kris Coolsaet


Consider the following wildcard mapping in the struts.xml file

        <action name="List*s" class="actions.List{1}s">
            <result>list{1}s.jsp</result>
        </action>

This mapping works as expected for actions with names like 'ListAccounts', but does not seem to work with the action named
'ListSponsors'. My guess is that {1} is set to 'Spon' instead of the 'Sponsor' I expected. (The error messages are not very
informative.)

If this is the intended behaviour, it would be a good idea to document this with an example.

In this particular case a workaround consist of using the following wildcard mapping instead
 
        <action name="List*" class="actions.List{1}">
            <result>list{1}.jsp</result>
        </action>

but in other cases it might not be so easy.


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


Re: [jira] Created: (WW-2529) Wildcard mappings match not as expected

Posted by James Mitchell <jm...@gmail.com>.
This is not an issue.  If you want better documentation, then add to
one of the existing issues about that.

Please ask questions on the users list.

Thank you

On Tue, Mar 4, 2008 at 4:14 AM, Kris Coolsaet (JIRA) <ji...@apache.org> wrote:
> Wildcard mappings match not as expected
>  ---------------------------------------
>
>                  Key: WW-2529
>                  URL: https://issues.apache.org/struts/browse/WW-2529
>              Project: Struts 2
>           Issue Type: Bug
>           Components: XML Configuration
>             Reporter: Kris Coolsaet
>
>
>  Consider the following wildcard mapping in the struts.xml file
>
>         <action name="List*s" class="actions.List{1}s">
>             <result>list{1}s.jsp</result>
>         </action>
>
>  This mapping works as expected for actions with names like 'ListAccounts', but does not seem to work with the action named
>  'ListSponsors'. My guess is that {1} is set to 'Spon' instead of the 'Sponsor' I expected. (The error messages are not very
>  informative.)
>
>  If this is the intended behaviour, it would be a good idea to document this with an example.
>
>  In this particular case a workaround consist of using the following wildcard mapping instead
>
>         <action name="List*" class="actions.List{1}">
>             <result>list{1}.jsp</result>
>         </action>
>
>  but in other cases it might not be so easy.
>
>
>  --
>  This message is automatically generated by JIRA.
>  -
>  You can reply to this email to add a comment to the issue online.
>
>



-- 
James Mitchell

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


[jira] Resolved: (WW-2529) Wildcard mappings match not as expected

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

Don Brown resolved WW-2529.
---------------------------

       Resolution: Fixed
    Fix Version/s: 2.1.2
         Assignee: Don Brown

I've documented the current behavior better:  http://cwiki.apache.org/confluence/display/WW/Wildcard+Mappings

If you'd like this to be improved, please open an improvement ticket and hopefully attach a patch :)

> Wildcard mappings match not as expected
> ---------------------------------------
>
>                 Key: WW-2529
>                 URL: https://issues.apache.org/struts/browse/WW-2529
>             Project: Struts 2
>          Issue Type: Bug
>          Components: XML Configuration
>            Reporter: Kris Coolsaet
>            Assignee: Don Brown
>             Fix For: 2.1.2
>
>
> Consider the following wildcard mapping in the struts.xml file
>         <action name="List*s" class="actions.List{1}s">
>             <result>list{1}s.jsp</result>
>         </action>
> This mapping works as expected for actions with names like 'ListAccounts', but does not seem to work with the action named
> 'ListSponsors'. My guess is that {1} is set to 'Spon' instead of the 'Sponsor' I expected. (The error messages are not very
> informative.)
> If this is the intended behaviour, it would be a good idea to document this with an example.
> In this particular case a workaround consist of using the following wildcard mapping instead
>  
>         <action name="List*" class="actions.List{1}">
>             <result>list{1}.jsp</result>
>         </action>
> but in other cases it might not be so easy.

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