Return-Path: X-Original-To: apmail-struts-user-archive@www.apache.org Delivered-To: apmail-struts-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 877AC929D for ; Mon, 30 Jan 2012 15:38:07 +0000 (UTC) Received: (qmail 96584 invoked by uid 500); 30 Jan 2012 15:38:05 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 96421 invoked by uid 500); 30 Jan 2012 15:38:04 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 96413 invoked by uid 99); 30 Jan 2012 15:38:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jan 2012 15:38:04 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [212.18.213.183] (HELO mail2.meetingmasters.de) (212.18.213.183) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Jan 2012 15:37:59 +0000 Received: from [192.168.65.44] by mail2.meetingmasters.de with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1RrtIV-0005T6-5i for user@struts.apache.org; Mon, 30 Jan 2012 16:37:36 +0100 Message-ID: <4F26B92E.1070206@meetingmasters.de> Date: Mon, 30 Jan 2012 16:37:18 +0100 From: Mounir Benzid User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:9.0) Gecko/20111222 Thunderbird/9.0.1 MIME-Version: 1.0 To: user@struts.apache.org References: <4F1E7B3F.4080808@meetingmasters.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 192.168.65.44 X-SA-Exim-Mail-From: mb@meetingmasters.de X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on zerberus.meetingmasters.local X-Spam-Level: Subject: Re: how to use Advanced wildcards X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:14:11 +0000) X-SA-Exim-Scanned: Yes (on mail2.meetingmasters.de) X-Old-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 Hi Maurizio, first let me sincerly thank you for fixing this issue [1]. It works like a charm now. Wondering why nobody else had a similar problem.... maybe the majority is opting for the rest-plugin? Anyway there's still a small issue regarding the redirectAction though. After calling the parametrised actionName ... display/{1}/{2} ... the URL gets cluttered with the now redundant parameters (action & eventId) and there's still an extra ".action" attached to it as well. like in http://localhost:8080/myEvents/display/edit/150.action?action=edit&eventId=150 That's the kind of URL signature that I'd like to avoid. Is there a way to circumvent this? Thank you again. - Mounir [1] https://issues.apache.org/jira/browse/WW-3747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel Am 25.01.2012 10:24, schrieb Maurizio Cucchiara: > I played with regex pattern and I realized that the example provided in > docs doesn't work [1]. > Could you file an issue on jira [2]? > > [1] http://struts.apache.org/2.3.1.2/docs/wildcard-mappings.html > [2] https://issues.apache.org/jira/browse/WW > > Maurizio Cucchiara > > On 24 January 2012 10:34, Mounir Benzid wrote: > > Hi, > > I'm having some trouble figuring out how to use the advanced wildcards > feature in struts II. > > What I'm trying to do looks as follows > > A) class="xxxx.actions.event.EventAction"> > > /WEB-INF/pages/myevents/createevent.jsp > > /display/{action}/{eventId} > > > > B) class="de.mm.moreevent.web.actions.event.EventAction"> > > /WEB-INF/pages/myevents/createevent.jsp > > > There 2 issues with this > > A) As long as I don't use any regexp patterns like [0-9]+ in the > configuration struts is happily matching the url against "EventAction" > http://blah/event/modify/edit/123 works perfectly fine. > Though in the above example the regexp in {eventId:[0-9]+} seems to prevent > this. > http://blah/event/modify/edit/123 doesn't get resovled > > B) I'm not able to use the same mechanics to redirectAction to another > action (say from A) to B). > I was hoping that "action" and "eventId" are automagically populated > through the value stack in A) and then then matching action B is called. > > These are my constants btw: > > > > > > thanks a lot! > - Mounir > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org > For additional commands, e-mail: user-help@struts.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org