Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 8948 invoked from network); 1 Nov 2006 14:13:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Nov 2006 14:13:41 -0000 Received: (qmail 60086 invoked by uid 500); 1 Nov 2006 14:13:39 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 60063 invoked by uid 500); 1 Nov 2006 14:13:39 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 60052 invoked by uid 99); 1 Nov 2006 14:13:38 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Nov 2006 06:13:38 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [212.67.202.165] (HELO bismuth.webfusion.co.uk) (212.67.202.165) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Nov 2006 06:13:21 -0800 Received: from 87-194-45-130.bethere.co.uk ([87.194.45.130] helo=[192.168.1.69]) by bismuth.webfusion.co.uk with esmtpa (Exim 4.54) id 1GfGpv-0001XX-Li for users@tomcat.apache.org; Wed, 01 Nov 2006 14:12:59 +0000 Message-ID: <4548AB6B.40907@pidster.com> Date: Wed, 01 Nov 2006 14:12:59 +0000 From: Pid Reply-To: p@pidster.com Organization: Pid Inc User-Agent: Thunderbird 1.5.0.7 (Macintosh/20060909) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: getting the full URL References: <04f501c6fdba$da747f10$0201a8c0@dialect> In-Reply-To: <04f501c6fdba$da747f10$0201a8c0@dialect> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org request.getRequestURL().toString(); getRequestURL is a StringBuffer of the full URL. Daniel Blumenthal wrote: > I'm trying to do what should be a fairly easy thing, but I'm really tearing > my hair out over this... > All I want is to be able to get the full URL (including scheme, queryString, > etc.). Right now, I'm trying something like: > > <% > out.write(request.getScheme() + ":/" + > request.getRequestURI().replace("jsp","do") + > (request.getQueryString().length() > 0 ? "?" + request.getQueryString() : > "")); > %> > > It feels like this should be a simple, single call. Any takers? > > Thanks! > Daniel > --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org