Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 20008 invoked from network); 10 Sep 2006 15:10:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Sep 2006 15:10:33 -0000 Received: (qmail 64671 invoked by uid 500); 10 Sep 2006 15:10:22 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 64648 invoked by uid 500); 10 Sep 2006 15:10:22 -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 64637 invoked by uid 99); 10 Sep 2006 15:10:21 -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:10:21 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of donald.brown@gmail.com designates 64.233.166.181 as permitted sender) Received: from [64.233.166.181] (HELO py-out-1112.google.com) (64.233.166.181) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Sep 2006 08:10:20 -0700 Received: by py-out-1112.google.com with SMTP id c59so1673735pyc for ; Sun, 10 Sep 2006 08:09:59 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jYtnMLnnGqOkM6bhKFk69Khcxq+H6YIKoH2JkMLSPN6hfo79I+38WGdkCW75xrhgGub55+xf7siM4fqCe1/rRrKUBGFLcLCLr4LuVsAWQmrRTO29RtZR1bMDcm+BXaKWyzErlcCpaI9BhqJm8ufXQWV516H6KkXyS/Vqi1E3BEE= Received: by 10.35.115.18 with SMTP id s18mr6936377pym; Sun, 10 Sep 2006 08:09:59 -0700 (PDT) Received: by 10.35.117.7 with HTTP; Sun, 10 Sep 2006 08:09:59 -0700 (PDT) Message-ID: <1c661f2f0609100809i375d8f26jb2a2516e1294186d@mail.gmail.com> Date: Sun, 10 Sep 2006 08:09:59 -0700 From: "Don Brown" To: "Struts Users Mailing List" Subject: Re: How do I get the original RequestURI? In-Reply-To: <450428BB.90109@cs.umu.se> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <45040924.2050804@cs.umu.se> <450426AF.3040003@rochester.rr.com> <450428BB.90109@cs.umu.se> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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