PDF files download as JSP

I just upgraded to Leopard 10.5.6 this weekend from Tiger 10.4.11 then upgraded to 10.5.8. All went well except for a small glitch in Mail which I got fixed with the help of this forum. My newest problem is this morning I went online to my bank to download our monthly statement which always is in PDF format. The file downloaded fine, except the file title says it's a PDF, but the extension is .jsp. I contacted the bank and they have changed nothing so I am wondering is there a setting I need to change somewhere that would affect the download? At present I haven't found an application that will open .jsp files, but first I want to get them back to PDF format. Any suggestions will be appreciated.

Title Man wrote:
I just upgraded to Leopard 10.5.6 this weekend from Tiger 10.4.11 then upgraded to 10.5.8. All went well except for a small glitch in Mail which I got fixed with the help of this forum. My newest problem is this morning I went online to my bank to download our monthly statement which always is in PDF format. The file downloaded fine, except the file title says it's a PDF, but the extension is .jsp. I contacted the bank and they have changed nothing so I am wondering is there a setting I need to change somewhere that would affect the download? At present I haven't found an application that will open .jsp files, but first I want to get them back to PDF format.
Have you tried renaming the file so that its extension is ".pdf"? I believe I regularly download PDF files that have "jsp" in the file name, but renaming them corrects the problem.

Similar Messages

  • Error while opening PDF file downloaded  from database Blob column

    Hi All,
    I am working on jdev 11.1.1.4.0.
    In my use-case I am using filedownload Actionlistner on a link to get the PDF file stored in the database in blob field. These files are being uploaded from other use-case in adf only.
    After getting the dialog box to open/save/cancel for the PDF file when i click on open then i am getting an error *'Adobe Reader could not open 'abc.pdf' because it is either not a supported file type*
    or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly docoded)' for some files , and to my surprise I am able to open some files.
    When I open these PDF files separately from desktop I am able to view the content of each and every file in adobe reader.
    I dont know where the problem exactly lies , while uploading/downloading the file . Any ideas/thoughts to resolve this issue?
    Thanks
    Kanika

    Thanks a lot Timo...!!!
    I checked the PDF file downloaded directly from the blob column in DB, there only it is corrupted so must be the problem in uploading the file. I am checking the code line by line,, but no problem in setting the file content type,size etc.
    Here is the code snippet ..
    byte[] buff;
    buff = new byte[(int)length]; -- Length is the file size
    int bytesRead = is.read(buff);
    for (int i = 0; bytesRead < buff.length; i++) {
    // int b = is.read();
    int b = is.read();
    if (b == -1)
    break;
    buff[i] = (byte)b;
    BlobDomain blobDomian = new BlobDomain((buff));
    TestVORow = (TestVORow Impl)TestVO.createRow();
    if(blobDomian != null) {
    TestVORow.setAttachment(blobDomian);
    am.getTransaction().commit();
    This seems to be Ok to me..the same issue, file is still corrupting.
    Any thoughts from your side ???
    Thanks
    Kanika
    The problem is resolved.
    Changes made are instead of
    InputStream is;
    used ... BufferedInputStream bis ;
    and after
    for (int i = 0; bytesRead < buff.length; i++) {
    // int b = bis.read();
    int b = bis.read();
    if (b == -1)
    break;
    buff[i] = (byte)b;
    bis.close(); // use this close bufferedInput Stream.
    Able to open each and every file now..Thanks for your suggestions Timo and Frank.
    Edited by: Kanika on Mar 6, 2012 3:15 AM

  • I used tag to show PDF file inside my JSP page, It is working properly in IE but nothing shows in Mozilla. What should I do?

    I've used to display a PDF file inside my JSP page. It is working fine in IE. However, many of users of this application are using Mozilla and the platform is Ubuntu so it is vital that the file is shown in Mozilla as well. How can I solve this problem.
    == This happened ==
    Every time Firefox opened
    == I run my jsp page

    Such conditional code will only work in IE and not in other browsers like Firefox.
    You can ask questions and advice about web development at the mozillaZine Web Development/Standards Evangelism forum.<br />
    A good place to ask questions and advice about web development is at the mozillaZine Web Development/Standards Evangelism forum.<br />
    The helpers at that forum are more knowledgeable about web development issues.<br />
    You need to register at the mozillaZine forum site in order to post at that forum.<br />
    See http://forums.mozillazine.org/viewforum.php?f=25

  • Just upgraded to Lion, can't open any pdf file downloaded from internet that was fine with Leopard. How can I overcome this obstacle ?

    Just upgraded to Lion, can't open any pdf file downloaded from the internet that was fine with Leopard before. I just got a black screen when I clicked on a pdf icon on a given internet site, and same happened with several sites that I visited. How can I overcome this obstacle ?

    Try two things with Safari not running:
    1) Launch Adobe Reader, open its preferences, select the Internet category, and check the values under "Display PDF in browser using".  If it's checked, try unchecking it.
    2) Look in /Library/Internet Plug-Ins (at the top-level of your boot volume) for something names AdobePDFViewer.plugin.  If you see such a file, try moving it to a folder named "Disabled Plug-Ins" (if such a folder exists) or onto the Desktop.
    Then see how things work.

  • Displaying pdf file in a jsp page...

    hi,
    I want to display a pdf document in a jsp page. i got that pdf file from a servlet class(MVC Architecture) through session. now my problem is to display that pdf file in my jsp page. can anyone give me a idea to solve this problem..

    hi,
    i used that code in scriplets. Actually my problem is I got one pdf file from session and i stored that file in a File object. the code is ..
    File pdfDocument = (File) session.getAttribute(CommonConstants.EBILL_PDF_DOCUMENT);
    now i have to display this pdf file in jsp..

  • Making .pdf files downloadable

    How do I make .pdf files downloadable in my iWeb page?
    I have several .pdf files on my desktop that I'd like to make available to visitors to my iWebsite for download. Please forgive me if this is "intuitively obvious." I am new to the forum and am also navigationally clumsy until I use it a while.

    You either need to Zip or Compress, as it is in 10.5 and then in iWeb click on Inspector and then Hyperlink and just create a hyperlink to a file. One someone clicks the link, it will then be downloaded as a Zip file containing the pdf.

  • PDF File Download from a JSP

    I want to have a JSP that will be used to download/display files. I created
              a test.jsp page that tries to return a test.pdf page. Whenever I run it,
              the browser displays some characters and then hangs, but never displays the
              pdf file. If I browse directly to the pdf file it displays fine in the
              browser. What am I doing wrong in this JSP page:
              <%@ page import="java.io.*" %>
              <%
              String mimeType = "application/pdf";
              response.setContentType(mimeType);
              try
              FileInputStream fis = new
              FileInputStream("d:\\work\\internet\\appserver\\presentation\\rdoc\\test.pdf
              ServletOutputStream sos = response.getOutputStream();
              System.out.println("Begin...");
              int i = fis.read();
              while(i != -1)
              sos.write(i);
              i = fis.read();
              sos.flush();
              sos.close();
              fis.close();
              System.out.println("End...");
              catch(Exception e)
              System.out.println(e);
              %>
              

    The JSP will send new lines etc. to the output stream because you have new
              lines in your JSP.
              All right, since you asked, I will have to post my secret source:
              ----- Original Message -----
              From: "Erik Lindquist" <[email protected]>
              Newsgroups: weblogic.developer.interest.jsp
              Sent: Wednesday, June 28, 2000 6:20 PM
              Subject: How to dynamically display images in JSPs
              >
              > This took a little while to figure out so I thought I'd share. After
              > doing some research I was led to the following approach on how to load
              > images from an Oracle database into a JSP:
              >
              > The "main" JSP:
              >
              > <HTML>
              > <head>
              > <title>Image Test</title>
              > </head>
              > <body>
              > <center>
              > hello
              > <P>
              > <img border=0 src="getImage.jsp?filename=2cents.GIF">
              > <P>
              > <img border=0 src="getImage.jsp?filename=dollar.gif">
              > <P>
              > world
              > </body>
              > </HTML>
              >
              >
              > And this is the image getter:
              >
              > <% try {
              > response.setContentType("image/gif");
              > String filename = (String) request.getParameter("filename");
              > java.sql.Connection conn =
              > java.sql.DriverManager.getConnection("jdbc:weblogic:pool:orapool"); //
              > connect to db
              > java.sql.Statement stmt = conn.createStatement();
              > String sql = "select image from testimage where filename = '" +
              > filename + "'";
              > java.sql.ResultSet rs = stmt.executeQuery(sql);
              > if (rs.next()) {
              > byte [] image = rs.getBytes(1);
              > java.io.OutputStream os = response.getOutputStream();
              > os.write(image);
              > os.flush();
              > os.close();
              > }
              > conn.close();
              > }
              > catch (Exception x) { System.out.println(x); }
              > %>
              >
              >
              > The thing to note is that there are no <%@ page import="..." %> or <%@
              > page contentType="..." %> tags - just the single scriptlet. It
              > seems that for every "<%@" the weblogic compiler sees it puts
              > out.print("\r\n"); statements in the generated java source.(???) I
              > don't know much about how browsers work but I think that once it sees
              > flat ascii come at it it treats everything that follows as text/plain
              > which is incorrect for the binary stream that's being sent. Another
              > work around was to set out = null; but that's kind of ugly and might
              > produce server errors. The real fix is to write a bean to handle images
              > which I'll work on next (does anybody have any hints on how to do
              > that?)
              Peace.
              Cameron Purdy
              http://www.tangosol.com
              "Jesse E Tilly" <[email protected]> wrote in message
              news:[email protected]...
              > [email protected] (Cameron Purdy) wrote in
              > <[email protected]>:
              >
              > >Your import will always cause junk to be sent before the PDF. You
              > >should do this as a servlet, not a .jsp.
              >
              > Really? What's the difference between JSP and Servlet as far as writing
              to
              > the response object is concerned?
              >
              > Btw, I forgot to mention that the setContentType should be done as late as
              > possible. It begins the response.
              >
              > Jesse
              

  • PDF force download via jsp not possible in IE ??????????????

    Hi guys,
              I am providing a jsp page which when displayed will prompt the user to Open or Save or Cancel on a PDF file. For some reason, the code is not working in Internet Explorer. Its working in Opera, Mozilla, Mozilla Firefox. But not working in IE. However, in my organisation, only IE is used. Therefore its paramount that it works in IE. Pls help me.
              Im attatching the snnipet of code that i am using.
              <%@ page language="java"%>
              <%@ page import="java.io.*"%>
              <%
              File file = new File ("C:\\Documents\\List.pdf");
              response.setContentType ("application/pdf");
              response.setHeader ("Content-disposition", "attachment; filename=List.pdf");
              BufferedInputStream in = new BufferedInputStream(new FileInputStream(file));
              ServletOutputStream outs = response.getOutputStream();
              byte bytes[] = new byte[4096];
              int i = 0;
              try
              while ((i = in.read(bytes,0,4096)) != -1)
              outs.write(bytes,0,i);
              catch (IOException ioe)
              ioe.printStackTrace();
              in.close();
              outs.flush();
              outs.close();
              %>
              The problem is as follows:
              The name of the jpf that forwards the requet to the jsp is DownloadPDFController.jsp and the url in IE comes as http://localhost:8053/downloads/DownloadPDFController.jpf
              Now, when this jpf runs and the control comes to the jsp, the pop-up box comes with three options Open, Save and Cancel. But the name of the file to be saved is not the PDF file but the jpf file that is displaying the file.
              This means that what actually is happening is that , the pop download box is coming with the name DownloadPDFController.jpf. I cant understand why its trying to save the JPF.
              The funny bit is that this happens only in IE and not in any other browser.
              Please help !!
              Thanks guys,
              Nikhil

    Put this at start:
              out.clear();
              if it does not work then... are you using post or get... use Post if you are using get...

  • Filename on file download from jsp

     

    This may help:
              ----- Original Message -----
              From: "Erik Lindquist" <[email protected]>
              Newsgroups: weblogic.developer.interest.jsp
              Sent: Wednesday, June 28, 2000 6:20 PM
              Subject: How to dynamically display images in JSPs
              > This took a little while to figure out so I thought I'd share. After
              > doing some research I was led to the following approach on how to load
              > images from an Oracle database into a JSP:
              >
              > The "main" JSP:
              >
              > <HTML>
              > <head>
              > <title>Image Test</title>
              > </head>
              > <body>
              > <center>
              > hello
              > <P>
              > <img border=0 src="getImage.jsp?filename=2cents.GIF">
              > <P>
              > <img border=0 src="getImage.jsp?filename=dollar.gif">
              > <P>
              > world
              > </body>
              > </HTML>
              >
              >
              > And this is the image getter:
              >
              > <% try {
              > response.setContentType("image/gif");
              > String filename = (String) request.getParameter("filename");
              > java.sql.Connection conn =
              > java.sql.DriverManager.getConnection("jdbc:weblogic:pool:orapool"); //
              > connect to db
              > java.sql.Statement stmt = conn.createStatement();
              > String sql = "select image from testimage where filename = '" +
              > filename + "'";
              > java.sql.ResultSet rs = stmt.executeQuery(sql);
              > if (rs.next()) {
              > byte [] image = rs.getBytes(1);
              > java.io.OutputStream os = response.getOutputStream();
              > os.write(image);
              > os.flush();
              > os.close();
              > }
              > conn.close();
              > }
              > catch (Exception x) { System.out.println(x); }
              > %>
              >
              >
              > The thing to note is that there are no <%@ page import="..." %> or <%@
              > page contentType="..." %> tags - just the single scriptlet. It
              > seems that for every "<%@" the weblogic compiler sees it puts
              > out.print("\r\n"); statements in the generated java source.(???) I
              > don't know much about how browsers work but I think that once it sees
              > flat ascii come at it it treats everything that follows as text/plain
              > which is incorrect for the binary stream that's being sent. Another
              > work around was to set out = null; but that's kind of ugly and might
              > produce server errors. The real fix is to write a bean to handle images
              > which I'll work on next (does anybody have any hints on how to do
              > that?)
              Cameron Purdy
              [email protected]
              http://www.tangosol.com
              WebLogic Consulting Available
              "Ramesh" <[email protected]> wrote in message
              news:[email protected]...
              >
              > Hi,
              >
              > Even I could download the files with this technique, I couldn't open the
              file downloaded. It seems the file is getting currepted during tranfer.. Can
              u help me in this regard please?
              >
              > Thank u
              > Ramesh
              >
              > [email protected] (Anders B. Jensen) wrote:
              > >In an Web-application written in Java Server Pages it should be possible
              > >for the user to download data from the web-server. The data will never
              > >exist as a file on the web-server, only in the PrintWriter object, out.
              > >To force the Internet Explorer (IE) to show the download dialog window
              > >the Contenttype of the HTTP-header have been set to "html/transfer". The
              > >question is:
              > >
              > >Is it possible to set the filename appearing in the download dialog
              > >appearing on the client?
              > >
              > >
              > >Below is a listing of the source-code:
              > >
              > ><%@ page extends="com.beasys.portal.admin.PortalJspBase"%>
              > ><jsp:useBean id="download" scope="session" class="dk.lec.DownloadData" />
              > >
              > ><%
              > > String tmpstr;
              > > response.setContentType("html/transfer");
              > > out.clear();
              > > tmpstr=download.getStrbuffer().toString();
              > > out.println(tmpstr.trim());
              > >%>
              > >
              > >
              > >Anders B. Jensen
              > >Consultant, Research & Development
              > >LEC AS
              > >
              > >Remove the SPAMLESS to mail me.
              >
              

  • How to make a PDF file downloadable on my website?

    Hi,
    I'm trying to create a PDF that can be downloaded from
    people that are on my website.
    I tried to point a link to the PDF file that's on my sever
    but all it does open the PDF file in a new window.
    How can i make it so that people can download that PDF file
    when they click on the link.
    the url to that website is
    Link">http://www.hostlyon.com/pizza-demo/[L=Link
    to website
    There will be a link on the navigation bar that says
    "download menu" . Thanks!!!

    .oO(watzursn)
    > I'm trying to create a PDF that can be downloaded from
    people that are on my
    >website.
    >
    > I tried to point a link to the PDF file that's on my
    sever but all it does
    >open the PDF file in a new window.
    >
    > How can i make it so that people can download that PDF
    file when they click on
    >the link.
    <a href="thepdf.pdf">Document Title (PDF, size in
    KB)</a>
    Micha

  • How to view pdf file in java/jsp?

    Hello Everybody,
    Any one help me how to view pdf file in jsp using java application.
    I have pdf file c:\app.pdf.
    How can i display the pdf file.
    Please help me.................
    Thanks

    Hello,
    You can use the below code, but i am not sure how far is this a startard way of doing it.
    # <%
    # ServletOutputStream servletOutputStream = response.getOutputStream();
    # File reportFile = new File("C:\\Tomcat 5.0\\webapps\\TestApp\\myfile.pdf");
    # FileInputStream fis = new FileInputStream(reportFile);
    # byte[] bytes= new byte[128000];
    # int count=fis.read(bytes);
    # try
    # response.setContentType("application/pdf");
    # response.setContentLength(bytes.length);
    # servletOutputStream.write(bytes, 0, bytes.length);
    # servletOutputStream.flush();
    # servletOutputStream.close();
    # }catch(Exception e){}

  • PDF files downloading as html files

    I am trying to save pdf files from a database but firefox keeps on saving them as html files instead, even when saving it shows it saving as *.pdf. I have only just fixed the problem of not being able to open the pdf files and now using adobe reader add on but now can't save the files I have opened. I need to be able to access these documents when not online. Instead of studying for the last 3 hours I have been trying to solve issues since downloading the lastest version of firefox. This was never an issue with the older version.

    Hi WinchesterBunnyMama, what exactly is your problem. Is it this issue:
    Some users are finding that an update changed the description of "Adobe Acrobat Document" to "Firefox HTML Document". The installer was supposed to add Firefox as an ADDITIONAL viewer for PDFs, not as the DEFAULT viewer. Sorry if you were affected by this glitch and hopefully they will figure out why some systems get changed this way.
    You can try this fix suggested by a user in another thread:
    # Open Adobe Reader / Acrobat*
    # Edit->Preferences
    # In the Categories column click 'General'
    # Near the bottom of the page click the button marked 'Select Default PDF Handler'
    # In the dialog, select 'Adobe Reader XI' (or Adobe Acrobat, as the case may be) and click 'Apply'
    # A Windows Configuration screen will appear. Allow it to do its stuff (takes a few minutes), then restart your computer when prompted.
    Does that work for you?
    ''*'' If you do not have Adobe Reader 11, you can install it from here: http://get.adobe.com/reader/

  • When I open a link in a pdf file downloaded by Foxfire, it uses Safari, not Foxfire, although I have designated Foxfire as my default browser

    When I download a pdf file with Foxfire and then click on a link therein, it calls upon Safari, not Foxfire, to get that link. This causes some complications. I have designated Foxfire as my default browser, so this should not happen. Is this a fault of Adobe or something else?
    == This happened ==
    A few times a week
    == some time ago

    -> Tap ALT key or press F10 to show the Menu Bar
    -> go to Help Menu -> select "Restart with Add-ons Disabled"
    Firefox will close then it will open up with just basic Firefox. Now do this:
    -> Update ALL your Firefox Plug-ins https://www.mozilla.com/en-US/plugincheck/
    -> go to View Menu -> Zoom -> click "Reset" -> Page Style -> select "Basic Page Style"
    -> go to View Menu -> Toolbars -> unselect All Unwanted toolbars
    -> go Tools Menu -> Clear Recent History -> '''Time range to clear: select EVERYTHING''' -> click Details (small arrow) button -> place Checkmarks on '''Cookies, Cache''' -> click "Clear Now"
    -> go to Tools Menu -> Options -> Content -> place Checkmarks on:
    1) Block Pop-up windows 2) Load images automatically 3) Enable JavaScript
    -> go to Tools Menu -> Options -> Security -> place Checkmarks on:
    1) Warn me when sites try to install add-ons 2) Block reported attack sites 3) Block reported web forgeries 4) Remember Passwords for sites
    -> Click OK on Options window
    -> click the Favicon (small drop down menu icon) on Firefox SearchBar (its position is on the Right side of the Address Bar) -> click "Manage Search Engines" -> select all Unwanted Search Engines and click Remove -> click OK
    -> go to Tools Menu -> Add-ons -> Extensions section -> REMOVE All Unwanted/Suspicious Extensions (Add-ons) -> Restart Firefox
    You can enable your Known & Trustworthy Add-ons later. Check and tell if its working.

  • Acrobat Reader can't open PDF file downloaded from the internet

    I downloaded the following pdf file from the internet and saved it to the desktop. When I tried to open the file I got a message saying Acrobat couldn't open it. I do not have trouble opening other PDF files. There is something about opening certain PDF files from the internet that is causing this. Is there a setting in the PDF preferences that is causing this or some security setting.
    http://www.porteverglades.net/include/content/docs/media/Port-map-2009.pdf

    It seems that Safari is unable to export the document as a PDF because the exported file was zero bytes. That's why I couldn't open it. I tried Firefox and did a File>Save. It saved the file as a PDF which I was able to open. So proglem solved.

  • ERROR OPENING PDF FILES DOWNLOADED FROM INTERNET

    I have a problem when I download a pdf file from Internet and I try to open in throughout Acrobat Reader. It appeared one error saying "The file path is not valid". What can I do?.

    Hi there,
    I found this can happen if the file does not download correctly. When this happens, simply try redownloading the file and wait until it has fully downloaded before doing anything else with the browser.
    Does that work now?
    If you want to thank someone for their comment, do so by clicking the Thumbs Up icon.
    If your issue is resolved, don't forget to click the Solution button on the resolution!

Maybe you are looking for