Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 8192 invoked from network); 20 Dec 2005 21:43:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 20 Dec 2005 21:43:52 -0000 Received: (qmail 85169 invoked by uid 500); 20 Dec 2005 21:43:38 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 85154 invoked by uid 500); 20 Dec 2005 21:43:38 -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 85143 invoked by uid 99); 20 Dec 2005 21:43:38 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Dec 2005 13:43:38 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of bfaist@oneil.com designates 66.194.184.36 as permitted sender) Received: from [66.194.184.36] (HELO meridius.oneil.com) (66.194.184.36) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Dec 2005 13:43:35 -0800 Received: from [192.168.1.240] ([192.168.1.240]:29960 "EHLO daytonnt6.oneilinc.net") by meridius.oneil.com with ESMTP id S210768AbVLTVnP convert rfc822-to-8bit (ORCPT ); Tue, 20 Dec 2005 16:43:15 -0500 Received: from DAYTONEX.oneilinc.net (daytonex1.oneilinc.net) by daytonnt6.oneilinc.net (Clearswift SMTPRS 5.0.9) with ESMTP id for ; Tue, 20 Dec 2005 16:43:14 -0500 x-mimeole: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT Subject: RE: Redirect from CGI servlet Date: Tue, 20 Dec 2005 16:43:14 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Redirect from CGI servlet Thread-Index: AcYFrMAEuxa0eRQ2QJOd8Cord4vjdgAAN8Ig From: "Bob Faist" To: "Tomcat Users List" , "Martin Gainty" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N The "from" and "to" URLs are definitely different in this case as they are different CGI scripts. Someone posted a similar question previously based a Google search but I can not connect to the MARC archives. 'RE: Tomcat CGI and HTTP status codes' - MARC When I try to access the cgi, It > doesn;t redirect, but downloads the file. It seems that tomcat is > changing the 302 status to a 200 somewhere. ... marc.theaimsgroup.com/?l=tomcat-user&m=111825503817933&w=2 - Similar pages When this same app is hosted though the Apache web server, there is only one response header status of "Moved - 302" and the redirect functions OK. Thanks for the help. Bob -----Original Message----- From: Martin Gainty [mailto:mgainty@hotmail.com] Sent: Tuesday, December 20, 2005 4:31 PM To: Tomcat Users List Subject: Re: Redirect from CGI servlet Good Afternoon Bob- I found an asnswer here http://archives.java.sun.com/cgi-bin/wa?A2=ind9811&L=servlet-interest&F= &S=&P=94953 to quote "When most browsers receive a reply with status 302 (Moved Temporarily), they look at the Location header, and automatically call the page specified there. However, as I have found, if the URL of the page _to_ which you are redirecting is the SAME as the page _from_ which you have sent the redirection, the browser assumes you are in a redirect loop. It then displays the message instead of auto-redirecting" tack on a querystring to the new URL tells the browser that you are not in a 'redirect loop' Anyone else? Martin- ----- Original Message ----- From: "Bob Faist" To: Sent: Tuesday, December 20, 2005 4:18 PM Subject: Redirect from CGI servlet > Tomcat 5.5 > Windows XP > > I'm trying to retro-fit a perl CGI web app into Tomcat and the only > remaining issue is redirects. I have enabled the CGI servlet in the > conf/web.xml file. I have a CGI script which is setting the HTTP > response header to a redirect type but Tomcat seems to setting the > status to 200. The CGI script is supposed to redirect a user to another > page based on successful login (form POST). I examine the HTTP response > header with a Firefox extension and it shows that there are 2 "Status" > values. The header contains "302 Moved" and "200 OK". My guess is that > the browser is seeing the "200 OK" and not handling the redirect. > > Does the CGI servlet handle this redirect scenario? > > Response Headers - > http://bfaist-ws:8080/emsng_ietm/cgi-bin/WebService_Login.pl > > Server: Apache-Coyote/1.1 > Status: 302 Moved > Location: http://bfaist-ws:8080/emsng_ietm/cgi-bin/IETM_Menu.pl > Transfer-Encoding: chunked > Date: Tue, 20 Dec 2005 21:13:16 GMT > > 200 OK > > > ********************************************************************** > Confidentiality Notice > The information contained in this e-mail is confidential and intended for > use only by the person(s) or organization listed in the address. If you have > received this communication in error, please contact the sender at O'Neil & > Associates, Inc., immediately. Any copying, dissemination, or distribution > of this communication, other than by the intended recipient, is strictly > prohibited. > ********************************************************************** > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org