Return-Path: Delivered-To: apmail-struts-dev-archive@www.apache.org Received: (qmail 48074 invoked from network); 5 Jul 2005 17:55:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 Jul 2005 17:55:34 -0000 Received: (qmail 40580 invoked by uid 500); 5 Jul 2005 17:55:29 -0000 Delivered-To: apmail-struts-dev-archive@struts.apache.org Received: (qmail 40537 invoked by uid 500); 5 Jul 2005 17:55:28 -0000 Mailing-List: contact dev-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Struts Developers List" Reply-To: "Struts Developers List" Delivered-To: mailing list dev@struts.apache.org Received: (qmail 40520 invoked by uid 99); 5 Jul 2005 17:55:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2005 10:55:28 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jmikus@gmail.com designates 64.233.184.202 as permitted sender) Received: from [64.233.184.202] (HELO wproxy.gmail.com) (64.233.184.202) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Jul 2005 10:55:28 -0700 Received: by wproxy.gmail.com with SMTP id i3so917422wra for ; Tue, 05 Jul 2005 10:55:24 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=ajNpfXkcaNmWDtboOeOeVqh2pnZwV8tWRQ17SRwqUX3qa30aMQgHRAKdNee1Y3KvyXwGjADNMUEPtqqZkuNIQn3MbCEPWDTOQld8507jraRCo91MEYuBBk5Iz715FMZX0kCxNsySEZiNXiXETvWtNDSOJGUGZO+KMPGSIIv8Wck= Received: by 10.54.3.17 with SMTP id 17mr4508751wrc; Tue, 05 Jul 2005 10:55:24 -0700 (PDT) Received: by 10.54.45.39 with HTTP; Tue, 5 Jul 2005 10:55:23 -0700 (PDT) Message-ID: <1db11534050705105576c50350@mail.gmail.com> Date: Tue, 5 Jul 2005 10:55:23 -0700 From: Michael Jouravlev Reply-To: Michael Jouravlev To: Struts Developers List Subject: Re: HTTP method for action-mappings In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N At 7:11 PM +0100 7/4/05, Miles, AJ \(Alistair\) wrote: >Hi all, > >A struts-config.xml file is a great way to formally specify a REST >API. However, with struts 1.2 you cannot configure separate action >mappings for GET vs POST requests to the same resource. What about >adding a 'method' attribute to the 'action' element? I differentiate between POST and GET in the my Struts Dialogs library. I need to separate input submitted with POST, from rendering request which has GET type. So I have this simple method: /** * Returns true if request is considered "input" request.=20 * By convention dialog input is sent via POST, result page=20 * is loaded via GET. * @param request The HTTP request we are processing */ protected boolean isInput(HttpServletRequest request) { return "POST".equalsIgnoreCase(request.getMethod()); } Michael. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org For additional commands, e-mail: dev-help@struts.apache.org