Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 21230 invoked from network); 10 Sep 2006 15:20:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Sep 2006 15:20:40 -0000 Received: (qmail 81707 invoked by uid 500); 10 Sep 2006 15:20:32 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 80684 invoked by uid 500); 10 Sep 2006 15:20:29 -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 80673 invoked by uid 99); 10 Sep 2006 15:20:29 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Sep 2006 08:20:29 -0700 X-ASF-Spam-Status: No, hits=0.9 required=10.0 tests=DNS_FROM_RFC_WHOIS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of asamere@rochester.rr.com designates 24.24.2.58 as permitted sender) Received: from [24.24.2.58] (HELO ms-smtp-04.nyroc.rr.com) (24.24.2.58) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Sep 2006 08:20:28 -0700 Received: from [127.0.0.1] (cpe-66-66-11-144.rochester.res.rr.com [66.66.11.144]) by ms-smtp-04.nyroc.rr.com (8.13.6/8.13.6) with ESMTP id k8AFK5uA027658 for ; Sun, 10 Sep 2006 11:20:06 -0400 (EDT) Message-ID: <45042D26.7020901@rochester.rr.com> Date: Sun, 10 Sep 2006 11:20:06 -0400 From: Adam J Samere User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: Struts Users Mailing List Subject: Re: How do I get the original RequestURI? References: <45040924.2050804@cs.umu.se> <450426AF.3040003@rochester.rr.com> <450428BB.90109@cs.umu.se> <1c661f2f0609100809i375d8f26jb2a2516e1294186d@mail.gmail.com> In-Reply-To: <1c661f2f0609100809i375d8f26jb2a2516e1294186d@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 1.2 does not have this behavior. You could either use a filter as I mentioned, or to stay within the struts framework either create a common base Action subclass, or subclass RequestProcessor or ActionMapping to add the desired functionality. Either way would be a trivial task. I agree with Don, action chaining is bad! :) Don Brown wrote: > Well, first of all, action chaing is bad ;), but second, Struts 1.3 at > least, and perhaps 1.2 automatically saves the original request uri > for you. Look in the request under the > o.a.struts.Globals.ORIGINAL_REQUEST_URI key. > > Don > > On 9/10/06, David Grundberg wrote: >> You are absolutely right about that, I could modify PlaceAction to save >> the URL somewhere. But you see, I'm doing a lot of forwarding to the >> ListAction, and I don't want to change every Action that forwards to >> ListAction. Come on! There's got to be a way to find the original URL. >> >> Adam J Samere skrev: >> > You could call getRequestURI in PlaceAction and set the result into a >> > request attribute (assuming PlaceAction forwards to list.do, not a >> > redirect) which would then be available to ListAction. If you are >> > redirecting you would need to either set the value into the session, >> > or append it as a request parameter to list.do. Not sure if there is a >> > better way though. >> > >> > Adam >> > >> > David Grundberg wrote: >> >> Hi, >> >> >> >> I want to do something like this: >> >> 1. User enters http://localhost/appname/welcome.do >> >> 2. PlaceAction forwards to list.do >> >> 3. In ListAction, I want to retrieve the URL the user entered >> >> "/appname/welcome.do". >> >> >> >> The problem: when I run getRequestURI in the ListAction, all I get is >> >> "/appname/list.do". I guess this is a sort of natural thing for it to >> >> do, but how do I get the original URI? (/appname/welcome.do) >> >> >> >> Any help appreciated! >> >> >> >> --------------------------------------------------------------------- >> >> 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 >> >> >> --------------------------------------------------------------------- >> 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 > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org