Thanks for the reply.  Here's what I have tested this with:

   public void doGet (HttpServletRequest request,
                       HttpServletResponse response)
        throws ServletException, IOException {

        response.setContentType("application/pdf");
        
response.sendRedirect("http://wp.bitpipe.com/resource/org_905740864_63/200206.pdf");
    }

exactly as you suggested.

The strange thing is that after the servlet issues the redirect, the browser
kind of half loads the link to the pdf file.  The redirect works to the point
where the location field of the browser changes, but the url does not load.

You (unfortunately) can see this behavious on our production site.  With IE go
to:   http://www.bitpipe.com/data/detail?id=958056924_280&type=RES     and
click on the URL.  You'll see what I'm talking about, though the code sample
above exhibits the same problem.

This has been verified on IE 5.00.2920.000 and 5.00.2314.1003

Any thoughts on why this fails to work?

-Tim

On Tue, 06 Jun 2000, Rob van Oostrum wrote:
> Not sure what your problem is. I've done stuff like this and almost
> exclusively use IE5. Without a code sample it's hard to say anything. What
> works for me is this:
>
> servletResponse.setContentType( "application/pdf" )
> servletResponse.sendRedirect( "http://www.foo.com/foo.pdf" );
>
> The API docs clearly specify that the URL HAS to be absolute, so make sure
> you're doing this correctly. If you're pointing to a relative location and
> it's been working, you were lucky.
>
> If this doesn't help you try sending a snippet of your code.
>
> Good luck
> Rob
>
>
>
> > -----Original Message-----
> > The company I work for is using a servlet to log requests for
> > documents on our
> > site.  The way this works is that the link for the document
> > actually goes
> > through a servlet I wrote, which logs the request and issues
> > a redirect to the
> > "real" url.  This has been working fine, but recently we
> > discovered a serious
> > bug involving Internet Explorer and redirects to .pdf files.
> > If you click on
> > the url which goes through the servlet, the browser hangs for
> > a bit, and then
> > finally returns "unable to find object to handle request".
> >
> > Note: This works FINE with all other browsers we've tested.
> >
> > To test this, I wrote a very simple servlet which only issues
> > a redirect to a
> > pdf file we host, and it fails too.  We suspect this is
> > something related to
> > mime-types, and hence I tried setting the mime-type to
> > "application/pdf" before
> > issuing the redirect in the servlet above, but it had no
> > effect and ellicited
> > the same behaviour.  Is the <gasp> an IE bug?  Does anyone
> > know of a workaround?
> >
> > Platform:
> > ApacheJServ 1.1.1, ibm jdk 1.18 for Linux, JSDK2.0
> >
> > Can anyone shed some light on this?
> >
> > Thanks much,
> >
> > -Tim
> >
> > ______________________________________________________________
> > _____________
> > To unsubscribe, send email to [EMAIL PROTECTED] and
> > include in the body
> > of the message "signoff SERVLET-INTEREST".
> >
> > Archives: http://archives.java.sun.com/archives/servlet-interest.html
> > Resources:
> http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to