Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-3747

Regular expressions in combination with advanced wildcards doesn't work

    XMLWordPrintableJSON

Details

    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)

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

      Attachments

        Activity

          People

            maurizio.cucchiara Maurizio Cucchiara
            kiviuq Mo Be
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: