-
1. Re: Reading a remote file from Servlet
peterj Jul 13, 2011 1:37 PM (in response to josephtau)Need a few more details
1) Is your app modifying the pdf in any way or is it simply serving the pdf as-is?
2) Does you app change the mime type of its response, and if so, what mime type are you using?
3) Does the same mime type appear in the web.xml, either the one for your app or the global one in JBoss AS?
4) In both cases, are you using the exact same browser? For example, in both cases you are using the IE browser on your Win 7 desktop. If not, does it still have the same issue when you do?
-
2. Re: Reading a remote file from Servlet
josephtau Jul 15, 2011 2:33 PM (in response to peterj)The application is serving a pdf as is. It doesn't change the mime type. On the win7 destop I use Firefox 5.0 and on the other machine its IE8.
-
3. Re: Reading a remote file from Servlet
peterj Jul 15, 2011 5:09 PM (in response to josephtau)I think you need to do two things. First, you need to know the mime type used to send the pdf to the browser (the default ype of text/html used by a servlet ain't gonna work! By the way, exactly how is the PDF transported? Form your earlier post I assumed that you had something like a servlet read the PDF file and ship the bytes to the browser, but your latest post has me thinking that all you have is a link to the pdf file on a web page, which means that JBoss AS would serve it directly without any action on the part of your app). Then you need to determine whether IE8 is configured to handle that mime type.
I assume that you tried switching browsers? In other words, what happens with IE8 (or 9) on your dev machine and with FireFox on the test server.
Essentially, it is the mime type that tells your bowser what kind of information is coming from the server. So this requires two things: first, the server nust send the proper mime type for the data stream, second the brorser must be configured to recognize the mime type so that it can properly handle the data stream.