Return-Path: X-Original-To: apmail-struts-issues-archive@minotaur.apache.org Delivered-To: apmail-struts-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 49E0218D1B for ; Thu, 7 Jan 2016 17:28:40 +0000 (UTC) Received: (qmail 11616 invoked by uid 500); 7 Jan 2016 17:28:40 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 11538 invoked by uid 500); 7 Jan 2016 17:28:40 -0000 Mailing-List: contact issues-help@struts.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@struts.apache.org Delivered-To: mailing list issues@struts.apache.org Received: (qmail 11514 invoked by uid 99); 7 Jan 2016 17:28:40 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jan 2016 17:28:39 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id D89EA2C1F56 for ; Thu, 7 Jan 2016 17:28:39 +0000 (UTC) Date: Thu, 7 Jan 2016 17:28:39 +0000 (UTC) From: "victorsosa (JIRA)" To: issues@struts.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (WW-3262) improve wildcard to support regular expressions MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/WW-3262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15087713#comment-15087713 ] victorsosa edited comment on WW-3262 at 1/7/16 5:27 PM: -------------------------------------------------------- Base on the JSR-339 Template parameters can optionally specify the regular expression used to match their values. The default value matches any text and terminates at the end of a path segment but other values can be used to alter this behavior, e.g.: @Path("widgets/{path:.+}") public class Widget { ... } In the above example the Widgetresource class will be matched for any request whose path starts with widgets and contains at least one more path segment; the value of the path parameter will be the request path following widgets. E.g. given the request path widgets/small/a the value of path would be small/a. Shouldn't this be implemented as part of the REST plugin??? was (Author: victorsosa): Base on the JSR-339 Template parameters can optionally specify the regular expression used to match their values. The default value matches any text and terminates at the end of a path segment but other values can be used to alter this behavior, e.g.: @Path("widgets/{path:.+}") public class Widget { ... } In the above example the Widgetresource class will be matched for any request whose path starts with widgets and contains at least one more path segment; the value of the path parameter will be the request path following widgets. E.g. given the request path widgets/small/a the value of path would be small/a. Shouldn't this be implemented as part of the REST plugin??? > improve wildcard to support regular expressions > ----------------------------------------------- > > Key: WW-3262 > URL: https://issues.apache.org/jira/browse/WW-3262 > Project: Struts 2 > Issue Type: Improvement > Affects Versions: 2.1.8 > Reporter: musachy > Fix For: 3.0 > > > The regular expressions will follow the syntax of JAX-RS. They can be like {PARAM_NAME} or {PARAM_NAME:REGEX}. For example: > > > /tags/ui/example.jsp > > > > > > /tags/ui/example.jsp > > > /tags/ui/{1}.jsp > > -- This message was sent by Atlassian JIRA (v6.3.4#6332)