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

improve wildcard to support regular expressions

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.8
    • Fix Version/s: 2.5.x
    • Component/s: None
    • Labels:
      None

      Description

      The regular expressions will follow the syntax of JAX-RS. They can be like {PARAM_NAME} or {PARAM_NAME:REGEX}. For example:

             <package name="regex" extends="struts-default" namespace="/">
      		<action name="/{bio:.+}/test/{name}" class="org.apache.struts2.showcase.UITagExample">
      			<result>/tags/ui/example.jsp</result>
      		</action>
      	</package>
      	
      	<package name="regex2" extends="struts-default" namespace="/superurl">
      		<action name="/{bio:.+}/test/{name}" class="org.apache.struts2.showcase.UITagExample">
      			<result>/tags/ui/example.jsp</result>
      		</action>
      		<action name="/{bio:.+}/test2/{name}" class="org.apache.struts2.showcase.UITagExample">
      			<result>/tags/ui/{1}.jsp</result>
      		</action>
      	</package>
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              musachy musachy
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: