You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Maurizio Cucchiara (Updated) (JIRA)" <ji...@apache.org> on 2012/01/28 19:17:10 UTC

[jira] [Updated] (WW-3747) Regular expressions in combination with advanced wildcards doesn't work

     [ https://issues.apache.org/jira/browse/WW-3747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Maurizio Cucchiara updated WW-3747:
-----------------------------------

    Description: 
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)
{code:xml}
<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>
{code}

B)

{code:xml}
<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>
{code}


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!


  was:
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!


        Summary: Regular expressions in combination with advanced wildcards doesn't work  (was: redirectAction and regular expressions in combination with advanced wildcards don't work)
    
> Regular expressions in combination with advanced wildcards doesn'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)
> {code:xml}
> <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>
> {code}
> B)
> {code:xml}
> <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>
> {code}
> 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