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 21A7398C5 for ; Wed, 11 Jul 2012 07:21:39 +0000 (UTC) Received: (qmail 91979 invoked by uid 500); 11 Jul 2012 07:21:38 -0000 Delivered-To: apmail-struts-issues-archive@struts.apache.org Received: (qmail 91623 invoked by uid 500); 11 Jul 2012 07:21:37 -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 91561 invoked by uid 99); 11 Jul 2012 07:21:34 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 Jul 2012 07:21:34 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 93D50141BF8 for ; Wed, 11 Jul 2012 07:21:34 +0000 (UTC) Date: Wed, 11 Jul 2012 07:21:34 +0000 (UTC) From: "Lukasz Lenart (JIRA)" To: issues@struts.apache.org Message-ID: <882554934.33982.1341991294608.JavaMail.jiratomcat@issues-vm> In-Reply-To: <149927371.28729.1341934775001.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (WW-3849) Hability PrefixBasedActionMapper to exclude the prefix when retrieveing the ActionMapper 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-3849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13411290#comment-13411290 ] Lukasz Lenart commented on WW-3849: ----------------------------------- I'm not sure, do you want to reuse actions or ActionMappers ? > Hability PrefixBasedActionMapper to exclude the prefix when retrieveing the ActionMapper > ---------------------------------------------------------------------------------------- > > Key: WW-3849 > URL: https://issues.apache.org/jira/browse/WW-3849 > Project: Struts 2 > Issue Type: Improvement > Components: Dispatch Filter > Affects Versions: 2.2.3 > Reporter: Jose L Martinez-Avial > > The PrefixBasedActionMapper is able to map different actions to different mappers using prefixes. So you can have something like this: > /preffix1:mapper1,/preffix2:mapper2,:defaultMapper > And the following URIs would be processed by different mappers > /preffix1/mynamespace1/myaction1 (by mapper1) > /preffix2/mynamespace1/myaction1 (by mapper2) > /mynamespace1/myaction1 (by defaultMapper) > So you can have three different ActionMappers, one per prefix. The problem with this is that you can not reuse the same actions for different prefixes(ie, reuse an ActionMapper), since the ActionMapper will try to match the full URI, without taking out the prefix. I suggest to parametrize the PrefixBasedActionMapper to remove the preffix from the URI when calling the ActionMapper, so the same mapper can be used more than once. -- 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