Opening .pdf through servlet

Hi,
I'm running a web-app that creates a pdf and opens it in a new browser window once the file has been created. My pre-developement environment is on Tomcat and the app works fine there. Once I test the app on a SunONE server, the app cannot open up the file. I'm just using a:
response.sendRedirect("location of file");
Why would it not work on SunONE but on Tomcat. The file is being created on both and its not a path issue. On the SunONE server I get a browser popup saying "Cannot download file....". Not sure why this comes up.
Thank you

Try this
response.setContentType("application/pdf")
response.sendRedirect("location of file");Regards
Manikantan

Similar Messages

  • Can't open pdfs through ie8/9 crashes upon opening

    adobe reader plugin crashes when trying open pdfs through internet explorer 8 or 9 i have windows vista 32 bit home premium i need to get assignments for class but can't with the plugin crashing all the time when opening the file to view it adobe plugin works fine on my laptop but not on my desktop  can anyone help me fix this

    i tried other browsers all give the same error when opening a pdf right now i can't even open the pdf through the schools moodle system where the pdfs are uploaded i tried firefox and google chrome no luck in opening or downloading

  • Problem in converting XML to PDF through Servlet

    Hi friends,
    I've a button in a page which should open a pdf from an existing xml. I've used the fop mechanism and servlet to do that. I've to deploy that in an unix/solaris environment. When i'm trying to do that it's giving me an exception at the place where it's trying to convert the file(transformer.transform(src,res)) It's as below..
    Thu Oct 20 14:43:47 IST 2005:<E> <ServletContext-General> Servlet failed with Exception
    java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
    at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
    at sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:54)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:115)
    at java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:53)
    at java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1006)
    at org.apache.fop.svg.PDFGraphics2D.<init>(PDFGraphics2D.java:1401)
    at org.apache.fop.render.pdf.PDFRenderer.renderSVGDocument(PDFRenderer.java:638)
    Some one told me that there are some problems with unix env and graphics. If anyone had ever seen this problem before, pls reply. Thanks in advance.

    Hi Anil,
    Please mail across your outbound agreement export, ecs, XSD and XML which you are using for testing to my id (in my profile)
    Regards,
    Anuj

  • Disable Save, copy option of PDF through servlet

    Hi,
    I have a servet which displays the pdf files which is stored in a server. That is happening perfectly. But now i need to disable the pdf save copy all those options is that is possible through my servlet. i can control right click and ctrl c using java script but i don't know how i can handle the save as copy option. Any idea ???
    Regards
    Rasa

    rasa wrote:
    I too hate :-)
    But it is a client reqment.
    I am not using itext or pdfwriter calss. as i told i am just reading the file and just showing the user through a servlet. But still let me try the options which you have givenThe base Java libraries can't do what you want. As Saish indicated either the Adobe or iText libraries will be needed. Adobe doesn't sell their libraries separately - you'd have to purchase their giant application server to use it.

  • Open PDF through forms in apps

    I have a requirement where in I need to open a pdf document on click of a button. This document is a static doc for guideline/help purpose (for users accessing the form from apps). I want to know the best way to handle this. I can store the document in a table in the database but I do not know how to open/invoke it through froms in apps environment.
    we are using forms 10g and are in R12.
    Thanks in advance.

    See your /forms/server/forms.con file. You can see that some virtual directories are defined, for instance /forms/html
    AliasMatch ^/forms/html/(..*) "C:\DevSuiteHome_1/tools/web/html/$1"The physical directory is located on the Application Server.
    For a single test, you could put your PDF in the physical directory, then display the document within Forms via the Web.Show_Document() built-in
    Web.Show_Document('/forms/html/mydoc.pdf','_blank')You can also create new virtual directories in this file to handle your docs, for instance :
    AliasMatch ^/forms/pdf/(..*) "C:\DevSuiteHome_1/tools/pdf/$1"Francois

  • Can't open PDF through hyperlink on internet

    I have created a PDF and loaded it to my web site. I then created a hyper-link to display the PDF in a new window.
    The link works in FireFox on my computer, it works on IE 6 on my work computer. It does not work on my home machine.
    I have Windows 7 with all critical patches, IE 8.0.7600.16385 cipher 256
    I have Adobe Acrobat 7 Professional installed and have done the repair and detect.
    I can manually tell IE 8 to open the file on my local hard drive and it does without any problem.
    It just won't from the web based link.
    The web page is http://www.bvnwcc.com/test%20link.html there is only one link.
    I also cannot open other links that are to pdf's on the internet.
    Any idea on how to fix this?

    I had no problem with either SeaMonkey or IE8. I am running Win7 with AA9.3.4.

  • How to open gnome through servlet ?

    Hi,
    i am not able to open gnome-terminal with the help of the following servlet statement in the client side tomcat server in the servlet.while it working well on my tomcat server........is ther any permission to open the gnome...pl let me know
    Statement..........................
    Runtime rt=null;
    Process p = rt.getRuntime().exec("gnome-terminal ");
    Please do hurry ....

    Hi,
    i am not able to open gnome-terminal with the help of
    the following servlet statement in the client side
    tomcat server in the servlet.Client-side tomcat server?
    while it working well on
    my tomcat server........is ther any permission to
    open the gnome...pl let me know
    Statement..........................
    Runtime rt=null;
    Process p = rt.getRuntime().exec("gnome-terminal ");
    Please do hurry ....Are you wanting to write a servlet (something that executes on the server) to open up a shell on the Client? That's not gonna work. If you've an X Server on the client then just export your DISPLAY and start a remote X session.
    Good Luck
    Lee

  • How to open pdfs directly in acrobat reader client side without using browser

    When I sent a request to the pdf through servlet
    the requested pdf is coming in a browser , but I want it to open in acrobat reader only . Is it possible ?

    Hi,
    Yes you can open in acroread. I am not sure about syntax. Cheak it in API's of java.lang.
    It is somehow like this.
    System.exec("<location of acroread>",<pdf file name>);
    Check if it helps.
    Thanks
    Parsu
    iAS dev support team

  • Can't open PDFs anymore after 30 day trial of Captivate

    My Adobe Reader was working fine until I signed up for Adobe Captivate. Since then, everytime I try to open a PDF (multiple times per day), the Adobe Creatjive Cloud screen comes on saying that my trial period has ended.  I don't want to open PDFs through a fee-based system - I just want my old free reader back.  How can I fix it?

    Hi,
    Can you please check which application is associated to open the .pdf files.
    If its not Adobe Reader, please change it to Adobe Reader.
    The following article will help you : http://its.uncg.edu/Software/Available/Adobe/Default_Association/
    http://library.dickinson.edu/Technology/Training/Tutorials//General/windows/default_change .pdf
    You can check both the links and share the results with me.
    ~ Aditya

  • Problem on opening pdf file in IE inline (through streaming method)

    Hello
              I had a problem opening pdf file at IE through streaming. I create a page
              that have a hyperlink to open the new window and talk to a serlvet. When
              clicked, this serlvet will stream a pdf file from the file server to serlvet
              output stream. And the pdf file will be displayed within the browser.
              The problem comes that I can see the Acrobat Reader trailer screen display
              but the brower show nothing. I click refresh button to that serlvet to
              reload then it come up the content.
              Is anyone have the same trouble on this and any solution will be
              appreciated.
              Rondy Lee
              State Street Australia Ltd.
              

    Hello Rondy,
              You vae set mime type to application/pdf, which is good. But IE doesn't care
              of it !
              And I think your URL is too long because and I'm sure it leads to a buffer
              overflow (as they say at MS in their bug report).
              So as a workaround, you can rename your servlet mapping from Ecd/Download to
              Ecd/Download.pdf if you can, or make the URL length much more smaller.
              Try to go to MS site to find what is the precise bug#. I can't remember what
              it its number.
              I hope you'll find a solution.
              Dom
              "Rondy Lee" <[email protected]> a écrit dans le message news:
              [email protected]...
              > Thanks Dom, I will try to find it out
              >
              > This is the sample URL I used on local host:
              >
              http://ausyd1-wdev-01:7001/Datalightning/Ecd/Download?EcdId=20&Type=I&OpenMo
              > de=O&OutputType=PDF
              >
              > Also, I set content-deposition to "inline" to enforce IE to open the pdf
              > file. Content Type is application/pdf
              >
              > I hope this can tell more information.
              >
              > Rondy.
              >
              > State Street Australia Ltd.
              >
              > "Dominique Jean-Prost" <[email protected]> wrote in message
              > news:[email protected]...
              > > Hello Rondy.
              > >
              > > I already had problems using servlet streaming a pdf file to IE.
              > > What is the exact URL of your servlet ? IE has a bug : it does not care
              of
              > > the mime content you set up (I guess you made it). It only cares of the
              > > extension of the file it ties to read. In your case, I guess there is no
              > > extension because you're using a servlet. To look for the extension, it
              > > search the last dot in the URL, and it may have a problem it the URL is
              > too
              > > long (buffer overflow...).
              > > So you can map your servlet to an url which has a dot in its name, and
              > make
              > > the URL length smaller.
              > > I can't remember the IE bug #id but, it is official at MS.
              > > I hope this will help you.
              > >
              > > dom
              > >
              > > "Rondy Lee" <[email protected]> a écrit dans le message news:
              > > [email protected]...
              > > > Hello
              > > >
              > > > I had a problem opening pdf file at IE through streaming. I create a
              > page
              > > > that have a hyperlink to open the new window and talk to a serlvet.
              When
              > > > clicked, this serlvet will stream a pdf file from the file server to
              > > serlvet
              > > > output stream. And the pdf file will be displayed within the browser.
              > > >
              > > > The problem comes that I can see the Acrobat Reader trailer screen
              > display
              > > > but the brower show nothing. I click refresh button to that serlvet to
              > > > reload then it come up the content.
              > > >
              > > > Is anyone have the same trouble on this and any solution will be
              > > > appreciated.
              > > >
              > > > Rondy Lee
              > > >
              > > > State Street Australia Ltd.
              > > >
              > > >
              > > >
              > > >
              > > >
              > >
              > >
              >
              >
              

  • I have a problem with two PDF's when trying to open them through a link on a web page. The two PDF's open fine with Adobe on my own PC and on the server I have copied it to but when they are opened through a link on a web page (pointing to the server wher

    I have a problem with two PDF's when trying to open them through a link on a web page. The two PDF's open fine with Adobe on my own PC and on the server I have copied it to but when they are opened through a link on a web page (pointing to the server where the PDFs open fine) I get an error 'There was an error processing a page. Invalid function resource' The other one just doesn't open at all. Can anyone help with this please?

    Hello,
    Are the pdf linked correctly in the website? Is this a public website? If yes, please post the link here.
    ~Deepak

  • Problem in opening .ics and .vcs file types through servlet in IE browser.

    I'm having problem in downloading an .ics and .vcs file through servlet in I.E browser. It is happening fine in Mozilla firefox(they both are getting opened in OutLook), but in IE it says as undefined file type.
    I'm using Content Type as : 'text/Calendar' and then setting header as :
    response().setContentType("text/Calendar");
    response().setContentLength(file.length());
    response().setHeader("Content-Disposition", "attachment;
    filename="+filepath);
    and after that i'm writing it to OutPut stream.
    Plz Help.

    Hi,
    On page load check whether the session values are there. If not redirect the user to the login page.
    Hope this helps,
    Regards,
    Sammani

  • Since I have connected my iPad with the MacBook through ICloud I have problems in Preview of opening PDF- and JPG-files. Does anyone have a solution for this?

    Since I have connected my iPad with the MacBook through ICloud I have problems in Preview of opening PDF- and JPG-files. Does anyone have a solution for this?

    I'm not sure I understand the connection between iCloud and this problem.  Is it simply a problem of coincidental timing (ie, the problem happened after you set up iCloud)?  If so, there's almost certainly no connection between these two events.
    Where are you getting the files you're trying to open, and what specifically happens when you try to open them?

  • Mac User: Trouble opening PDFs that appear through google searches.

    I can open pdfs that I converted from Word documents that I created, but can't open pdfs that appear through google searches. Please advise/help. Thank you.

    What is your operating system?  Browser?  Reader version?
    What exactly means "can't"?

  • Hi I have just tried to convert a pdf through Adobe Export PDF, it appears to process it, but when I open the word file it just has the lines on it, and no words.

    hi I have just tried to convert a pdf through Adobe Export PDF, it appears to process it, but when I open the word file it just has the lines on it, and no words.

    Hi nickel13,
    What is the problem you are facing?
    Is this happening with a single PDF file?
    Regards,
    Florence

Maybe you are looking for

  • NFe de devolução com referencia a Cupom Fiscal - Versão 3.10

    Olá pessoal, boa tarde! Tenho o seguinte cenário em uma instalação de IS-Retail. O sistema legado no PDV não emite notas fiscais eletrônicas para acobertar processos de devolução de vendas. Este processos, eram realizados no ECC para a versão 2.0 sem

  • Edit video without importing locally?

    I'm brand new to Final Cut and FCPX is my first experience with the product. I have a Mac Mini server with a thunderbolt-attached storage array that I'm using to store my raw footage. I'm editing video on my MacBook Air using the storage device mount

  • How Do I Link to Custom Component States From Scrolling Content Buttons?

    Hi there, I'm in need of some help as i've got a deadline to meet within the next few weeks and im stuck! Basically what I've done is i've made a scrolling content lists, containing about 10 products in each one, my plan was to turn each product into

  • How to block certain Distribution Channel / Billing type combination?

    Hello, Is there a possibility to prevent creating biling document if it contains certain combination of Distribution channel in document header and billing type (i.e. F2 / 20)?. Some user exit? Thanx.

  • File is picked by XI but not placed in Receiver

    Hi All, Im working on file to file scenario, i hav done with the design and configuration.The problem is the file is been picked up by the server but it is not placing in the receiver folder.Im using NFS but no content conversion is been done. I have