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

Lukasz Lenart edited comment on WW-3262 at 9/16/26 6:18 AM:
------------------------------------------------------------

This was implemented in r818958 (the same day the ticket was filed) as 
RegexPatternMatcher, selectable with struts.patternMatcher=regex, and shipped 
in 2.2.1. Both forms from the description are supported, the plain named 
parameter and the named parameter with a regular expression, and covered by 
RegexPatternMatcherTest. Documented under "Advanced Wildcards" on the Wildcard 
Mappings page. Closing as Fixed.


was (Author: lukaszlenart):
This was implemented in r818958 (the same day the ticket was filed) as 
RegexPatternMatcher, selectable with struts.patternMatcher=regex, and shipped 
in 2.2.1. Both forms from the description are supported, PARAM\_NAME and 
PARAM\_NAME:REGEX, and covered by RegexPatternMatcherTest. Documented under 
"Advanced Wildcards" on the Wildcard Mappings page. Closing as Fixed.

> improve wildcard to support regular expressions
> -----------------------------------------------
>
>                 Key: WW-3262
>                 URL: https://issues.apache.org/jira/browse/WW-3262
>             Project: Struts 2
>          Issue Type: Improvement
>          Components: Core
>    Affects Versions: 2.1.8
>            Reporter: Musachy Barroso
>            Priority: Major
>             Fix For: 2.2.1
>
>
> The regular expressions will follow the syntax of JAX-RS. They can be like 
> {{\{PARAM_NAME\}}} or {{\{PARAM_NAME:REGEX\}}}. For example:
> {code:xml}
>        <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>
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to