How to download a pdf file from the server from an strut application?

Hi,
I wan to download a pdf file from the server side to local system. Please help me how i use the down load option.

Read up on the Struts download action [1].
And next time, please post in the relevant forum, one of the web-tier ones [2].
[1] http://wiki.apache.org/struts/StrutsFileDownload
[2] http://forum.java.sun.com/category.jspa?categoryID=20
People on the forum help others voluntarily, it's not their job.
Help them help you.
Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
----------------------------------------------------------------

Similar Messages

  • How to download a pdf file in external storage(sd-card) not use a isolated storage wp8

    i have a url for download pdf file return by webservices 
    and i have attach this link in hypertext button this is start a download but in browser . and when i am google for this purpose the give me "
    Background file transfer
    " Process and then code is also using a isolated storage but i want a external storage process Please Help me 
    how to download a pdf file in external storage(sd-card) not use a isolated storage wp8 

    Hello,
    This forum is for discussions and questions regarding profiles and Microsoft's recognition system on the MSDN and TechNet sites. It is not for products/technologies.
    As it's off-topic here, I am moving the question to the
    Where is the forum for... forum.
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C40686F746D61696C2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • How to send a PDF file as a FAX from Oracle Reports 6i

    Hi
    I want to know how to send a PDF file as a FAX from Oracle Reports 6i. Or please post any sample code in reports that sends PDF document as FAX
    Help need immediately.
    Thanks in advance. my email id is
    [email protected]
    Arun
    null

    hello,
    there is no native support for directly faxing a report. you could e.g. use a fax-software that has a printer-driver that supports this.
    regards,
    the oracle reports team

  • When attempting to open a hyperlink to a PDF file on the web from a Microsoft WORD for Mac 2011 (14.3.9) document, Safari 7.0 instead displays the file as text?

    When attempting to open a hyperlink to a PDF file on the web from a Microsoft WORD for Mac 2011 (14.3.9) document, Safari 7.0 instead displays the file as text?

    As seen in http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macword/has-the-word- 2011-for-mac-invisible-toolbars/018a3ab6-0570-4ad5-abf8-5b6427fdde3e?msgId=e111b f0a-0e32-4fa3-9536-f349dad8439d
    and it worked for me:
    1. Quit Word
    2. In the Finder's menu bar, select Go > Go to folder and type or paste: ~/Library/Preferences/
    3. Click on Go
    4. Locate the preference file com.microsoft.Word.plist, then Option-drag it to the desktop to create a backup copy
    5. Go to Applications/Utilities and open Terminal
    6. Paste the following bold command at the $ prompt (it's a single line):
         defaults write com.microsoft.Word 14\\Toolbars\\Show_HIToolbar -boolean TRUE
    7. Press Return and then quit with Command Q
    8. Start Word and test. If the fix works, trash the backup file in the Desktop file. Otherwise, restore it.
    In the original source the author also mentions the change in Word 2008

  • How to attach a PDF file TO the form so that recipients can access the file as a resource?

    How to attach a PDF file TO the form so that recipients can access the file as a resource?

    Sorry we do not support this. What you can do though is add a Formatted Text element and add a link to a PDF. To insert a link add some text, select the text and right click on the text (or look under the Insert menu in the top right of the scene)
    Gen

  • How to Generate PDF file on the server

    Hello Everybody !
    I Need to generate a PDF File on the server, and I'm usin the command :
    "OPEN DATASET p_path FOR OUTPUT IN BINARY MODE message l_verro .
           LOOP AT t_lines.
             TRANSFER t_lines-tdline TO p_path.
           ENDLOOP.
           CLOSE DATASET p_path.  "
    The File was generated, but is corrupt . Don't Open the file, It's wrong.
    When I use the function GUI_DOWNLOAD the file is generated  right. But in the server not.
    Can someone help me please ??
    Best Regards,
    Wagner Duarte

    Hi.
    did you check this post?
    Download PDF File to SAP Application Server
    It doest the same as you are asking.
          " Write PDF Binary Data to App Server
        OPEN DATASET lv_filename FOR OUTPUT IN BINARY MODE.
        IF sy-subrc = 0.
          LOOP AT lines INTO ls_data.
            TRANSFER ls_data TO lv_filename.
          ENDLOOP.
        ENDIF.
        CLOSE DATASET lv_filename.
    Regards
    Miguel

  • Can any one tell me how to attach a pdf file to the mail through workflow

    I have a smart which i am able  to convert it to a pdf file...now.. can any one tell me how to attach a pdf file to the mail through workflow

    Hi,
    To create the task for attachment
    Use the BOR SELFITEM and method NOTES_APPEND.
    The out come of this task contain a link called attachment with a clip attached. Clisk on that icon and choose the type of attachment u want . RAW , EXCEL , TXT , PDF... Then using the import icon u can attach the document u like.
    But the TYPE : OBJ.
    Similarly using NOTE_DISPLAY method u can display the documents u like.
    In any work item u have the facility to attach any atttchment for further circulation .
    Attchment @ WORKITEM
    1.Click the workitem for which you want to create the attchment
    2.Press create attachment
    3. Add the attachment u like (PDF)
    Reward points for useful answer.
    Richard A

  • Mac mini Server 10.6  unable to search for files on the server from desktop.

    I'm running Mac mini Server 10.6 with 15 various Apple Mac desktops 10.4 / 10.6. The problem i'm having is that i'm unable to search for files on the server from any of the desktops. I have fixed permissions and rebooted. I can perfomr a search though command - F and spotlight from the server.
    Anyone have any ideas?

    I have a Mac mini server with Mac osx 10.6.8 installed --- I have a website {UNDER CONSTRUCTION} installed on it with a REGISTERED DOMAIN NAME belizeansworldwide.com -->[DNS service w/GoDaddy]  & DSL INTERNET service  w/VERIZON --- {My server is the ONLY DEVICE CONNECTED to my VERIZON DSL router/modem}
    When I enter my DOMAIN NAME or WAN IP # in my browser(s)--> Chrome OR Safari -- i get my Verizon modem
    set-up page-->{this incl the WAN IP# as I expected}----{NORMALLY I WOULD ACCESS MY Actiontec
    modem/router via 192.168.1.1} --- While in that webpage there's an option "shared files/folders"   & clicking on that option DISPLAYS MY WEBSITE --->  {"PORT FORWARDING DID NOT RESOLVE THAT"}
    My next attempt @ a solution was through my Server's SystemPreference>Sharing>Internet Sharing
    & this the Original Object of my post ===>  "MY SHARING PANEL DOES NOT INCLUDE THE OPTION
    FOR   'Internet Sharing' among the others like CD DVD, Remote Login,Remote Management, Bluetooth Sharing, etc.etc ---- Hope this additional info will help to clarify  &/or explain my problem
    Thanks, & best regards to you & yours

  • Opening Output Stream to a file on the server from Applet

    Hi,
    I am trying to write a little applet which parses a file found on the server , lets the user select some Strings then write the selected Strings to a different file on the server. I use the following code:
    String fileName = new String("LineUp");
    URL docBase = null;
    URLConnection conn = null;
    try {
    docBase = new URL(ApppletName.codeBase, fileName);
    } catch (java.net.MalformedURLException e) {
    System.out.println("Couldn't create image: "
    + "badly specified URL");
    try {
    conn = docBase.openConnection();
    } catch(IOException e) {System.out.println(e);}
    String playerString;
    try {
    conn.setAllowUserInteraction(true);
    conn.setDoOutput(true);
    conn.connect();
    PrintWriter out = new PrintWriter(
    conn.getOutputStream());
    etc..
    The problem I am having is that the getOutputStream routine for the connection object does nothing other than throw an exception (I've stepped through the code and that is all the routine actually does). The connection is actually made but no output stream can be created. I have looked at the Java Tutorial (as I am fairly new to Java) and found a spot where they tell you how to write to a file on the server, which is the example I have followed. Any suggestions? What am I missing?

    Yes, that's what I thought. It talks about writing to a URL, and you have interpreted "URL" as if it meant "file". A URL is a "Uniform Resource Locator", which is a string that identifies a "resource" on the server. Often that corresponds to a file on the server, but not always. It could be a page that is dynamically generated by a script on the server.
    Look again at that page and you will see these words: "At the other end, a cgi-bin script (usually) on the server receives the data, processes it, and then sends you a response, usually in the form of a new HTML page." What that means is, you can't just upload a file to a URL unless you have programmed the server to deal with that upload. That's part of the basic design of the HTTP protocol.
    So, unfortunately, you can't do what you want all that easily. You would have to provide some programming at the server to handle the file upload for you. In Java that means writing a servlet and getting the web server to have that servlet handle all requests to a particular URL. I suspect you don't want to get into that just yet. But if you do, any decent book on Java servlets should have an example of how to upload files like this.

  • TS1402 I can not copy any files from the server & from the Finder. System MAC OS 10.7.5

    I can not copy any files from the server & from the Finder. System MAC OS 10.7.5
    <Email Edited by Host>

    Hi, what is the no boot directory found about???
    Can you give details step by step of what you're trying?

  • How to download a .pdf file from a JavaMail application?

    hi to all,
    iam unable to download a .pdf file from a mailserver using
    my javamail application.i have downloaded all kind of files except .pdf.
    my code snipnet:
    public static void dumpPart(Part p) throws Exception {
    //     if (p instanceof Message)          dumpEnvelope((Message)p);
              System.out.println("CONTENT-TYPE: " + p.getContentType());
              Object o = p.getContent();
              if (o instanceof String) {
                   System.out.println("This is a String");
                   System.out.println((String)o);
                   } else if (o instanceof Multipart) {
                        System.out.println("This is a Multipart");
                        Multipart mp = (Multipart)o;
                        int count = mp.getCount();
    System.out.println("****************************************");
    System.out.println("count" + count);
    System.out.println("****************************************");
                        for (int i = 0; i < count; i++){
                             System.out.println("CONTENT-TYPE: " + p.getContentType());
                             dumpPart(mp.getBodyPart(i));
                        } else if (o instanceof InputStream) {
                             System.out.println("This is just an input stream");
                             InputStream is = (InputStream)o;
                             String filename=System.currentTimeMillis()+".exe     ";
                             FileOutputStream fos=new FileOutputStream(filename);
                             int c;
                             while ((c = is.read()) != -1)
                                  //System.out.write(c);
                                  fos.write((char)c);
    }//dumpPart
    what's wrong with this code?
    Nagaraju.G

    fos.write((char)c);Converting the byte to a char is unnecessary and probably harmful. Just do this: fos.write(c);

  • How to show the pdf file into the UIWebView from iphone documents directory?

    Hi ,
         I am working on web services right now I am getting string into base64 format. After decoding that string into NSData i am saving that data as a pdf into Document directory of iphone. Now the problem is that when I want to show the pdf into UIwebView then it is showing blank page. But when I am checking into /Users/pareshkarnawat/Library/Application Support/iPhone Simulator/4.3.2/Applications/ the pdf file is correctly generated and working fine when I ope it.
       How to show that pdf file into UIwebview ? or is there any alernative for this.
    Any ideas on how I can go about this? I have looked at a few posts and still can't seem to figure it out.
    Any idea's appreciated, thanks

    The result is a UIWebView that displays a blank page. No errors occur in the UIWebView delegate method. The thing is that data has the correct length, in bytes, for the PDF I am trying to display, and I also get the pdf file in Library/Application Support/iPhone Simulator/4.3.2/Applications/ Does anyone have an idea as to what might be going wrong here or how I can better debug this problem?

  • How to open word&pdf document in the AplicationServer from Clients (Forms10

    Hi,
    How can in open MS Word & PDF files in the application server/any other PC in network, from the Client. I am using forms 10g.
    Thanks in advance.
    Rizly

    Hi ,
    But it is not working. I think u mean the below code that I copied from the Webutil Document.
    However, when you change this code to use CLIENT_OLE2 (using search-and-replace)
    it doesn’t work.The following example is code which will convert to CLIENT_OLE2:
    DECLARE
    app CLIENT_OLE2.OBJ_TYPE;
    docs CLIENT_OLE2.OBJ_TYPE;
    doc CLIENT_OLE2.OBJ_TYPE;
    selection CLIENT_OLE2.OBJ_TYPE;
    args CLIENT_OLE2.LIST_TYPE;
    BEGIN
    -- create a new document
    app := CLIENT_OLE2.CREATE_OBJ('Word.Application');
    CLIENT_OLE2.SET_PROPERTY(app,'Visible',1);
    docs := CLIENT_OLE2.GET_OBJ_PROPERTY(app, 'Documents');
    doc := CLIENT_OLE2.INVOKE_OBJ(docs, 'add');
    selection := CLIENT_OLE2.GET_OBJ_PROPERTY(app, 'Selection');

  • How to download a pdf file

    I have a page with a link for download a pdf file, I want click the link, just download this file. do not need view it. (look like 'save target as' fuction)
    How can I do this?

    the save as or view of documents that you download are handled by the browser. If there is a registered viewer for your kind of documents, then the viewer will be used. Only way I can think of how to solve this is by fooling the browser and let it think that its a type it doesnt know, e.g.
    response.setContentType("arghhh/doesnotwanttobesaved");

  • How to open a pdf file in Acrobat Reader from a webdynpro application

    Hi,
    I need to open a pdf file stored in the server from a web dynpro application. The pdf needs to be opened in the stand alone reader at the client and not in a reader embedded in the browser.
    Cheers,
    Krish

    Hello,
    I'm fairly new to webdynpro and am trying to  render a pdf via webdynpro.
    The webdynpro application runs but I see only a blank screen with the title.Is there any specific setting I need to do in order to view this pdf?I have used the FileDownload-UIElement.
    Thanks in advance
    Biraj

Maybe you are looking for

  • Help! Adobe CS4 no longer working with Canon or Brother printers, & both drivers are current.

    Since upgrading to CS4 in 2009, I can no longer print PDFs (from Acrobat or Preview) to my two printers: Canon MP600 or Brother HL-5250DN. I also cannot print from InDesign. I can print, however, from Photoshop & Illustrator. Drivers for both Canon &

  • Error in MIRO for amount split

    Hi All, When I try to post invoice in MIRO with amount split I am getting error: Account assignment not completed for all required fields (PayT) Message no. F5A034. And in payment tab payment terms fields are missing. I have ticked 'Enable amount spl

  • Finding GRN Number

    hi,    i have created Outstanding Liability Grns report. for that report, i need grn number and grn date.    my tables are bsis,bsas,bkpf,bseg.   i have fetched the grn number of every document number from xref3 field. but for some datas, the Xref3 f

  • -107418650 error with PXI-4070 even W/O autorange.

    I have a PXI-1033 that includes a PXI-4070 in slot 5. I am using a version of the Switch Scanning with DMM - Handshaking.vi but I changed it to read a fixed scan list and replaced the meter while loop with a fixed read of 144 samples.  After this VI

  • Burn error message 4261

    Hello, I cannot burn in iTunes. After the third burn, it says "Unknown Error Occurred 4261". I have looked this up in the forum and tried several of the fixes that were listed and it is still not working. I used to be able to burn, now can't. Any sug