Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D231D10C26 for ; Mon, 9 Dec 2013 21:59:31 +0000 (UTC) Received: (qmail 88321 invoked by uid 500); 9 Dec 2013 21:59:28 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 88281 invoked by uid 500); 9 Dec 2013 21:59:28 -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 88272 invoked by uid 99); 9 Dec 2013 21:59:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Dec 2013 21:59:28 +0000 X-ASF-Spam-Status: No, hits=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [76.96.62.32] (HELO qmta03.westchester.pa.mail.comcast.net) (76.96.62.32) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Dec 2013 21:59:23 +0000 Received: from omta05.westchester.pa.mail.comcast.net ([76.96.62.43]) by qmta03.westchester.pa.mail.comcast.net with comcast id zRsV1m0030vyq2s53Zz3g3; Mon, 09 Dec 2013 21:59:03 +0000 Received: from Christophers-MacBook-Pro.local ([68.55.8.89]) by omta05.westchester.pa.mail.comcast.net with comcast id zZz21m01J1vFKdg3RZz3Fb; Mon, 09 Dec 2013 21:59:03 +0000 Message-ID: <52A63D26.7030309@christopherschultz.net> Date: Mon, 09 Dec 2013 16:59:02 -0500 From: Christopher Schultz User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Redirect or Forward a URL on tomcat References: <6E077874EB5F4141ACAFD5F07F1725F101A35EB11E@EXMBXPROD02.ad.txwesleyan.edu> <52A5D628.3040402@ice-sa.com> <6E077874EB5F4141ACAFD5F07F1725F101A35EC230@EXMBXPROD02.ad.txwesleyan.edu> <52A63582.6080100@ice-sa.com> In-Reply-To: <52A63582.6080100@ice-sa.com> X-Enigmail-Version: 1.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1386626343; bh=aeUcgM1qgmcUTAxH9vaOkgtjvsx2YjEw/t4s4Twf41I=; h=Received:Received:Message-ID:Date:From:MIME-Version:To:Subject: Content-Type; b=j1xw9AKDcD9N69k+z2L++mT0gW3nsoJZ2BC6pB8/8Yr29KF/Jhbqnnb5AUIhwK6ha pg4M6PJ7Cn9TXx//t0XIN+EnraNLZEQ0Wu8j+WYoVgARyN5eFBUbwP7PEHypFETxj8 OQTrZtgIkcCvi7hICtrlxzjds1OQdgnuFTPVVMNBpObLhxa8csJRbNq+y5eN/kroXs kBL1z9vkXhhZU7+sY1qxkhUHkk3vTez1byl6ZfCRh6IQeHWV0hEwWX4ieP5fNao1Xs VROK5n5+eE0exM4SAPw1JkACWcaHlfrXIL+b3DRJMk4m0dok2V79RQn4prr/YEQqV+ 1qzWnMxIpN5mg== X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 André, On 12/9/13, 4:26 PM, André Warnier wrote: > Madison Le wrote: > > On this list, please do not top-post. See : > http://tomcat.apache.org/lists.html#tomcat-users Important - #6 > >> Hello Andre', >> >> Yes, this looks strange but this webapp >> (https://ramlink.txwes.edu:8443/WebAdvisor/WebAdvisor) needs to >> have 2 levels down. It can have a different name at this levels >> (like WebAdvisor/Production), but it needs to have this format >> for it to work. Do You mean that make the >> https://ramlink.txwes.edu:8443/WebAdvisor/WebAdvisor to be the >> "default webapp" or https://ramlink.txwes.edu to the "default >> webapp" ? Do you know the article which talks about this? I could >> not find it. > See : http://wiki.apache.org/tomcat/HowTo #17 > > I meant to make it so that both "http://ramlink.txwes.edu:8080/" > and "http://ramlink.txwes.edu:8443/" lead directly to your webapp, > but if you confirm that it somehow "must be" configured as > "/WebAdvisor/x" then you may be out of luck with the standard and > easy method. > > You might need to create a ROOT context which "forwards" the calls > to "/", to "/WebAdvisor/". For that kind of thing, you may want to > look at the URLRewrite filter, at http://www.tuckey.org if I > remember right. If all you want to do is redirect the specific URL http://ramlink.txwes.edu:8080/ -> http://ramlink.txwes.edu:8080/WebAdvisor/WebAdvisor, then you probably don't need the "complexity" of url-rewrite: just code-up a catch-all servlet and have it execute a redirect. If you want to be able to redirect http://ramlink.txwes.edu:8080/foo/bar/baz -> http://ramlink.txwes.edu:8080/WebAdvisor/WebAdvisor/foo/bar/baz, then use url-rewrite, as it can do regular expression matching, replacement, etc. > Note that it is quite bad practice for an application to force one > to install it under any particular "context name". It probably > means that the application itself generates/contains > self-referencing absolute URLs in the pages which it returns, which > will probably create some additional headaches for you in terms of > getting it to work correctly under the root ("/") context. +1 - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBCAAGBQJSpj0mAAoJEBzwKT+lPKRYDxIQALEHVxMBkfOOFAxQ4S2UJNMe HK7TzZsFeqKFQCcwb0Qw9AASnBf4wW5jHiMdLO3k4Wf5oXsxhQleCNlBRqF2lj3l KDemznJ2WOgh7QZX0k7usqGRlK2q4/spTU6SVs3OvoAFs0W5mL/qyK0KhDD+E3/k gOqVIPNzbpyhhCtdJewYG8o20+TySdl9QkQdMDs7ThpLkll8WQ9LAhSUwnwPs6db tIRsDqQARJ6KsTfYRm579MDKXFYfJSnrn5Y96636BQdKTkpd48K6mVeTyVq9Dbz9 XrLXCJ3Z7dDdyZ9H02nuzwLD7YUQdmh4/ZHCH5HEyQ5FGMWPZkbqZOFfiEcSwgVa e5L/qOZbxAPa6zZRiCCU4i93XT8fD0NcezQ7rDdYXrGWdIrCBmp9aGRiuX07yBoS 11qo+lelauDtAW52Ei73LgWtimPAypoPFP4ABZWyr8Dsz9lDz09coXGOdOQz1emv ZjmKrBbvRioO3dLwqiWY+0SDccjBh3rw5Zy38I0dK73coT/6eUDlvN6yytXGPktf Qu8AzKbSjEfyzkSyGEx2p593brJz4t65wCIJYHI8DuG62jmUL2goC08AJKTcxbB3 WpvRnO2jWeYWiwgF/160jQF9TzLLsJLdFIZelyYkgdkZaBAXAwa98iFFzmb+EHp8 J9EbFz5imZCv/aErbufA =Wz3g -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org