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

Maurizio Cucchiara commented on WW-3747:
----------------------------------------

Hi,
according with the docs that you yourself pointed out, you should use the index 
place holder, instead of the label.
So your param definition should be:
{code}
<param name="actionName">/display/{1}/{2}</param>
{code}
(For this reason I'm going to remove the term *redirectAction* from the issue 
title).
Regarding the advanced regex, you are right, as I said before on the User ML, 
not even the example provided in the docs worked.
I have fixed the bug, now it should be work, you can test by yourself 
downloading the [latest 
snapshot|http://struts.apache.org/dev/builds.html#Nightly_Builds]
                
> redirectAction and regular expressions in combination with advanced wildcards 
> don't work
> ----------------------------------------------------------------------------------------
>
>                 Key: WW-3747
>                 URL: https://issues.apache.org/jira/browse/WW-3747
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Other
>    Affects Versions: 2.3.1.1
>         Environment: OS: Windows XP
> Java: 1.7 (Oracle)
>            Reporter: Mo Be
>            Assignee: Maurizio Cucchiara
>              Labels: advanced, redirectAction, regex, wildcards
>
> According to the documentation [1] that goes along with advanced wildcards, I 
> tried to implement the following example
> where I use advanced wildcards along with some simply regexp pattern and as a 
> redirectAction. I also posted this issue
> on the struts mailing list [2].
> A)
> <action 
> name="/event/modify/{action}/{eventId:[0-9]+}"class="xxxx.actions.event.EventAction">
>    <interceptor-ref name="simpleStack" />
>    <result name="input">/WEB-INF/pages/myevents/createevent.jsp</result>
>    <result name="success" type="redirectAction">
>      <param name="actionName">/display/{action}/{eventId}</param>
>    </result>
> </action>
> B)
> <action name="/display/{action}/{eventId}" method="input" 
> class="xxx.actions.event.EventAction">
>    <interceptor-ref name="simpleStack" />
>    <result>/WEB-INF/pages/myevents/createevent.jsp</result>
> </action>
> A) is working but only if I leave out the regexp part (at least for me)!
> Redirecting from A) to B) doesn't work at all. 
> [1] http://struts.apache.org/2.3.1.2/docs/wildcard-mappings.html
> [2] http://www.mail-archive.com/user%40struts.apache.org/msg101469.html
> cheers!

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to