tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kief Morris <k...@bitbull.com>
Subject Re: sendRedirect to PDF - repeats 3 times?
Date Sat, 20 Jan 2001 03:32:28 GMT
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



Mime
View raw message