You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Dave Frankson <df...@uswest.net> on 2001/01/20 00:10:34 UTC
sendRedirect to PDF - repeats 3 times?
Hello all,
I am experiencing a strange error, and I'm hoping someone can point me in the right direction.
Using Tomcat 3.2.1 or the latest 3.3, I have a simple servlet that has two lines of code in its doGet method which forwards a request to a pdf:
System.out.println("Forwarding to the PDF...");
response.sendRedirect("http://localhost:8080/campus/pdf/iep.pdf");
When I use IE 5.0 (version 5.00.2920.0000) and hit the servlet with a GET request, the servlet executes three times and then fails to redirect to the pdf.
The weird thing is this doesnt happen in IE 5.5 and it doesnt happen in Netscape. I need to get this fixed, and I was hoping someone could point me at the code I need to work with.
Thanks,
Dave Frankson
RE: sendRedirect to PDF - repeats 3 times?
Posted by Jayesh <ja...@yahoo.com>.
I had this problem. User IE 5.5 OR
Open Acrobat reader
Go to File, Preference, General and uncheck web browser integration.
If you notice, apache is setup to use HTTP 1.0 protocol for IE 5.0. Try
changing that. I don't remember which configuration file.
Give it a try.
Jayesh
-----Original Message-----
From: Dave Frankson [mailto:dfrankson@uswest.net]
Sent: Friday, January 19, 2001 11:57 PM
To: tomcat-dev@jakarta.apache.org
Subject: Re: sendRedirect to PDF - repeats 3 times?
I'm using Tomcat in stand alone without any integration with an external
web server.
Dave
----- Original Message -----
From: "Dan Milstein" <da...@shore.net>
To: <to...@jakarta.apache.org>
Sent: Friday, January 19, 2001 7:16 PM
Subject: Re: sendRedirect to PDF - repeats 3 times?
> Are you using TC in standalone mode?
>
> If not, are you using mod_jk? If so, which protocol are you using for
your web server talk to Tomcat (ajp13? ajp12? jserv?). Now that I mention
it, what web server are you using?
>
> Thanks,
> -Dan
>
> > Dave Frankson wrote:
> >
> > Hello all,
> >
> > I am experiencing a strange error, and I'm hoping someone can point me
in the right direction.
> >
> > Using Tomcat 3.2.1 or the latest 3.3, I have a simple servlet that has
two lines of code in its doGet method which forwards a request to a pdf:
> >
> > System.out.println("Forwarding to the PDF...");
> > response.sendRedirect("http://localhost:8080/campus/pdf/iep.pdf");
> >
> > When I use IE 5.0 (version 5.00.2920.0000) and hit the servlet with a
GET request, the servlet executes three times and then fails to redirect to
the pdf.
> >
> > The weird thing is this doesnt happen in IE 5.5 and it doesnt happen in
Netscape. I need to get this fixed, and I was hoping someone could point me
at the code I need to work with.
> >
> > Thanks,
> >
> > Dave Frankson
>
> --
>
> Dan Milstein // danmil@shore.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, email: tomcat-dev-help@jakarta.apache.org
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
Re: sendRedirect to PDF - repeats 3 times?
Posted by Dave Frankson <df...@uswest.net>.
I'm using Tomcat in stand alone without any integration with an external
web server.
Dave
----- Original Message -----
From: "Dan Milstein" <da...@shore.net>
To: <to...@jakarta.apache.org>
Sent: Friday, January 19, 2001 7:16 PM
Subject: Re: sendRedirect to PDF - repeats 3 times?
> Are you using TC in standalone mode?
>
> If not, are you using mod_jk? If so, which protocol are you using for
your web server talk to Tomcat (ajp13? ajp12? jserv?). Now that I mention
it, what web server are you using?
>
> Thanks,
> -Dan
>
> > Dave Frankson wrote:
> >
> > Hello all,
> >
> > I am experiencing a strange error, and I'm hoping someone can point me
in the right direction.
> >
> > Using Tomcat 3.2.1 or the latest 3.3, I have a simple servlet that has
two lines of code in its doGet method which forwards a request to a pdf:
> >
> > System.out.println("Forwarding to the PDF...");
> > response.sendRedirect("http://localhost:8080/campus/pdf/iep.pdf");
> >
> > When I use IE 5.0 (version 5.00.2920.0000) and hit the servlet with a
GET request, the servlet executes three times and then fails to redirect to
the pdf.
> >
> > The weird thing is this doesnt happen in IE 5.5 and it doesnt happen in
Netscape. I need to get this fixed, and I was hoping someone could point me
at the code I need to work with.
> >
> > Thanks,
> >
> > Dave Frankson
>
> --
>
> Dan Milstein // danmil@shore.net
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-dev-help@jakarta.apache.org
>
>
Re: sendRedirect to PDF - repeats 3 times?
Posted by Dan Milstein <da...@shore.net>.
Are you using TC in standalone mode?
If not, are you using mod_jk? If so, which protocol are you using for your web server talk to Tomcat (ajp13? ajp12? jserv?). Now that I mention it, what web server are you using?
Thanks,
-Dan
> Dave Frankson wrote:
>
> Hello all,
>
> I am experiencing a strange error, and I'm hoping someone can point me in the right direction.
>
> Using Tomcat 3.2.1 or the latest 3.3, I have a simple servlet that has two lines of code in its doGet method which forwards a request to a pdf:
>
> System.out.println("Forwarding to the PDF...");
> response.sendRedirect("http://localhost:8080/campus/pdf/iep.pdf");
>
> When I use IE 5.0 (version 5.00.2920.0000) and hit the servlet with a GET request, the servlet executes three times and then fails to redirect to the pdf.
>
> The weird thing is this doesnt happen in IE 5.5 and it doesnt happen in Netscape. I need to get this fixed, and I was hoping someone could point me at the code I need to work with.
>
> Thanks,
>
> Dave Frankson
--
Dan Milstein // danmil@shore.net
Re: sendRedirect to PDF - repeats 3 times?
Posted by Kief Morris <ki...@bitbull.com>.
Dave Frankson typed the following on 05:10 PM 1/19/2001 -0600
>Using Tomcat 3.2.1 or the latest 3.3, I have a simple servlet that has two lines of code in its doGet method which forwards a request to a pdf:
>
>System.out.println("Forwarding to the PDF...");
>response.sendRedirect("http://localhost:8080/campus/pdf/iep.pdf");
A redirect needs to be done before (actually, instead of) sending content
to the user: it works by sending a header:
Location:http://localhost:8080/campus/pdf/iep.pdf
Whereas your text is presumably meant to be in the body of the response.
Review the structure of HTTP requests and responses if you aren't clear
on why this is.
Kief