Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 66155 invoked from network); 11 Aug 2007 17:35:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 11 Aug 2007 17:35:55 -0000 Received: (qmail 8918 invoked by uid 500); 11 Aug 2007 17:35:44 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 8566 invoked by uid 500); 11 Aug 2007 17:35:43 -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 8555 invoked by uid 99); 11 Aug 2007 17:35:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Aug 2007 10:35:43 -0700 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 11 Aug 2007 17:35:38 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IJurt-0002Fi-SD for user@struts.apache.org; Sat, 11 Aug 2007 10:35:17 -0700 Message-ID: <12107451.post@talk.nabble.com> Date: Sat, 11 Aug 2007 10:35:17 -0700 (PDT) From: peterv To: user@struts.apache.org Subject: Multiple actions with overlapping URL ranges MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: peter@earth-photography.com X-Virus-Checked: Checked by ClamAV on apache.org Hi, Is there a way in Struts 2 to make the action mapper choose the Action to be invoked based on two criteria: 1) the action's name (eg. a wildcard mapping), and 2) a boolean value obtained by invoking a method in the action? Why I need this: I want to create friendly URLs for several types of resources (each having its own Action), for example: http://books.com/AuthorName/BookTitle http://books.com/Location/BranchName ... The names of these resources are unique across all resource types, so I don't want to define a unique URL prefix (eg. "/books" as in "http://books.com/books/AuthorName/BookTitle") for each type - instead I want to define actions that can determine for themselves if they can handle the given URL (eg. if there's a book with the title entered), and if not, the action mapper should move on to the next action. This would mean some extra overhead, but result in the required URLs (we're migrating an already operating site to Struts 2 and don't want to change the URL structure). Is there a way to do this? Or maybe another approach that lets action URL ranges overlap? Thanks, Peter -- View this message in context: http://www.nabble.com/Multiple-actions-with-overlapping-URL-ranges-tf4254169.html#a12107451 Sent from the Struts - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org