Code for displaying the word doc file from servlet as response.

Hi can any provide me code for displaying the word document form servlet as response.
here i have file from file it should ale to read them and display it.
i have written code but the proble here is in displaying.it ios as not showing as word.can any one help me here
vijay

Are we talking of HTTP?
If yes, you'll need to provide an appropriate content-type and use the binary output stream.
IE does not trust the content-type header but relies upon the file name, so set it too.
response.setHeader( "Content-Disposition", "attachment; filename=" etc. Edited by: BIJ001 on Oct 22, 2007 10:10 AM

Similar Messages

  • Code for displaying the elements of ArraList and HashMap

    hi..im new to java ..
    tell me the code for displaying the elements of ArraList and HashMap

    myj-ava wrote:
    wt abt displaying the elments of HashMap?plz..give clear codehey, this is not a code-giving service. This is a forum of volunteers who help others who have specific questions. I find that the greatest help is given to those who have shown that they've put in at least some effort. You have shown none. Please look at the Sun tutorials first, then come back with a specific question if anything there confuses you.

  • Having problem in displaying the word doc

    Hi
    i am searching for text in local files by taking as inpt.i am getting the result like in 1st line requested srtring
    2nd line whre it occured in text and
    3rd line with hyper link
    when i click hyper link here i am able see the text file. so i have placed word doc too in my input.here i a getting first and 2nd line fine. when click the 3rd line (hyper link) it is not showing the out put properley.it is not displaying tables and screens.can we open the word file directley?
    i am using code here like this
    fis = new FileInputStream(aFile );
              byte[] contents = new byte[(int)aFile.length() ];
              fis.read( contents );
              String document = new String(contents, "UTF-8"); is this byte is problem here do i need to write diff code here
    any help from u guys

    HI thank u for u r reply
    my real problem is i am doing search using uima.i have been sending the text files as input.and i am getting result here. with the same code i am trying it for word doc also.
    here do i need to download this java 6 then use that desktop.open or can i use it directley. if u want i will post my entire code here

  • To JDeveloper Tech Team & All: Displaying Microsoft Word Doc file in JDeveloper

    Is there any way, we can display a Microsoft Word Document file in JDeveloper ? I have JDeveloper 3.2.2 on my computer running Windows NT version 4.0 (SP 6). I appreciate your immediate responce. Thanks.

    In theory, you can display a DOC file in JDeveloper - given the correct JavaBean capable of reading DOC files and dispplaying it - then it could be hooked
    into JDeveloper as an Addin.
    But, wouldn't it be easier to display it in MS Word / other Doc Viewer?
    If DOC files are part of your development,
    then you can put a quick Invocation to Word / other tool in your JDeveloper Tools menu by editing the [JDev]\bin\tools.cfg file - See help for more info.
    I hope this helps,
    if not, please clarify further.
    -John

  • Can't open MS Word .doc files from SharePoint 2013 document library?

    Hello,
    I have uploaded some MS Word files with .doc extension into a SharePoint 2013 document library, but they don't open when clicked.  I can do a number of things to the file, like view and edit properties, download and other things, but it does not
    open up when mouse clicked.  There are PDF files in the document library and they open up just fine.  Any ideas?
    I should add that MS Word 2010 .docx files can not be opened either.
    Thanks.
    Paul

    Hi,
    Whether you use office 2013.
    Considering this .doc file can be smoothly opened in Office if you downloaded it to your local, it indicates that the Word document and Microsoft Word doesn’t have any problems. The issue may be caused by the compatibility between Office
    and your site.
    1.Check whether you have the SharePoint OpenDocuments Class add on enabled at first.
    Internet Explorer >Tools iron > Manage add-ons >
    Choose to Show All add-ons. Find SharePoint OpenDocuments Class and make sure it’s enabled.
    2.go to Compatibility view settings > add your SharePoint site to compatibility view
    3.go to Internet Options,
    Advanced > Reset… > Check Delete personal settings and reset
    Security > Trusted sites > sites > add SharePoint sites to trusted sites
    4.If it doesn’t work, please open Word, go to Options > Trust Center > Trust Center Settings > Protected View > Uncheck all.
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

  • T-code for display the storage locations

    Hi,
    Is there any tcode where we only display the storage locations, which is not the long one by using mm03 except for mmsc which is only authorized for limited people.
    Many Thanks
    Jean

    Hello Jean,
    SE16 will work for you but you will not get material description and also you need to make settings for output (for only required field.)
    The other option is , you can write a small ABAP query using MARD and MAKT (for material description, if you want) table.
    Hope this helps.
    Regards
    Arif Mansuri

  • How to send doc files from one system to another using XI

    Hi All,
    I have a requirement to pick the word doc files from one file system and send these word document files to ECC system place in ECC application server.Can we achieve this requirement using XI. If so how we can do this. also let me know can we convert these doc files into proxy and send to ECC?. Please let me know. Thanks.
    Regards,
    Rajesh

    Yes You Can
    XI Converts Unstructured data(That is non -XML)Type- in your case word doc and maps it to Target structure.
    You can either use content conversion
    /people/venkat.donela/blog/2005/03/02/introduction-to-simplefile-xi-filescenario-and-complete-walk-through-for-starterspart1
    /people/venkat.donela/blog/2005/03/03/introduction-to-simple-file-xi-filescenario-and-complete-walk-through-for-starterspart2
    /people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30
    /people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file
    /people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter
    /people/jeyakumar.muthu2/blog/2005/11/29/file-content-conversion-for-unequal-number-of-columns
    /people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem
    /people/michal.krawczyk2/blog/2004/12/15/how-to-send-a-flat-file-with-fixed-lengths-to-xi-30-using-a-central-file-adapter
    You can either built a adaptermodule for the same(U nedd to have Some Java knowledge)
    You can also convert without creating any objects in integration directory link for the same is
    /people/william.li/blog/2006/09/08/how-to-send-any-data-even-binary-through-xi-without-using-the-integration-repository
    ***********Please Reward Points If find Helpful*********

  • Download Word .doc file saved in MIME Repository to local PC

    I need to store a static Word document on the SAP server and download to the user's browser via a BSP application.  I have found code in the IT00 BSP Application to download the Word doc in xstring form to the browser, which will work for what I'm doing.  What I cannot seem to find, however, is how to retrieve the  Word .doc file stored in the MIME repository and then subsequently how to convert this MIME object to an xstring value.  Is there a class or function module available to retrieve and convert the MIME object to an xstring form so that it can be returned as a response back to the browser?

    you can use the following code snippet to read mime repository content.
    data: o_mr_api type ref to if_mr_api.
    if o_mr_api is initial.
    o_mr_api = cl_mime_repository_api=>if_mr_api~get_api( ).
    endif.
    call method o_mr_api->get
    exporting
    i_url = l_url
    importing
    e_is_folder = is_folder
    e_content = l_current
    e_loio = l_loio
    exceptions
    parameter_missing = 1
    error_occured = 2
    not_found = 3
    permission_failure = 4
    others = 5.
    l_current will hold the image in a XSTRING var
    Regards
    Raja

  • I have an MS word doc saved from a Macbook in my flash drive. Now i want to print this from an IBM compatible laptop. problem is -- I can't access the file. Please help.

    I have an MS word doc saved from a Macbook Pro on m flash drive. Now i want to print
    th same doc from an IBM Compatible laptop. Problem is, I can't access the file. Please help.

    I suggest you post your question on Microsofts own forums for their Mac products as it's their software you're having issues with:
    http://answers.microsoft.com/en-us/mac

  • Display the Word or html doc  which is stored as blob intable and SearchApplication

    Hi All,
    I have two doubts and are as follows....
    1)Created a table name
    create table documents(id number,doc blob);
    I created a form based on the above table. I have two text boxes on the form, one is to enter the id and the other one is upload the document. The default button are insert,query,update,reset ....
    I inserted a word document into the table with id = 1. when i query the table with the id=1. the word document is not displayed whereas when i insert a .bmp file i am able to see the image when i query.
    How can i display the word document when i query the table. Please give me suggestion to do it.
    what is the method to do it...If at all if the document(blob) is a HTMl document..How can i display...
    2) I have to create a search application...
    A text Box: To enter a word
    Serch Button: On click, it should search the documents in the documents Table(as mentioned above)
    And should display the list of documents that matches the criteria.....On click of a result item(link) the doc or html should be displayed....
    Thanks in Advance...
    Sreedhar

    Oliver -
    TestStand does not have any hooks to allow a test system developer to override the internal searching for a file on disk. The only simple option that I see is to to query the database and download the latest sequences ahead of time. This is similar to a Source Code Control mechanism. Keep in mind that once an execution loads a sequence file, the file is typically not released until the last execution completes so you cannot load an updated copy of the sequence file while executing, especially the client sequence file.
    Scott Richardson
    National Instruments

  • I bought your program to convert PDF files to WORD doc. files. I did this and when I send the files as an attachment to recipients the recipients say the attachment is blank! I want a refund!!

    I bought this Adobe program to convert PDF files to Word doc. files so I could e-mail them as an attachment to people who do not have Adobe Reader. When the people got my e-mail with the attachment and opened it. The attachment was BLANK!! Is there a way to correct this?? or should I just get my money back and cancel this program?

    Hi bogy,
    How very frustrating! I'm sorry that your email attachment was blank. I'm sure this is a silly question, but did the Word file display as expected on your own machine? If not, then the issue is quite likely with the conversion from PDF to Word (but what you describe isn't a common issue that we're hearing about).
    If it looks OK for you, then I suspect the issue lies outside of ExportPDF. If the Word doc is blank when you open it, then please tell me a bit more about the PDF that you're trying to convert and we will take it from there.
    Best,
    Sara

  • How to create pdf from word doc file

    HI
    I have a word doc file. (not docx). I have adobe 8 pro. I wrote a word script to create the file using the distiller. The fonts in the pdf file it makes look wacky. That script looks liek this:
    * create archive pdf file
    lfilename = "t:\cardeals\pdf\pdf_archive\" + PADL(alltrim(STR(month(date()))),2,"0") + PADL(alltrim(STR(DAY(DATE()))),2,"0") + SUBSTR(ALLTRIM(STR(YEAR(DATE()))),3,2) + "1.pdf"
    oWord = createOBJECT("Word.Application")
    oWord.DisplayAlerts = .f.
    oWord.documents.open('t:\cardeals\cardeals.doc')
    oword.ActivePrinter = "\\CSSSERVERONE\Overflow"
    oword.application.printout(,,,,,,,4,,,,,,,,,,,)
    oWord.PrintOut(.F.,.F.,,"c:\output.ps",,,,,,.F.)
    oPDF = CREATEOBJECT ( "PDFDistiller.PDFDistiller.1" )
    oPDF.FileToPDF("c:\output.ps", "&lfilename.", "High Quality" )
    oWord.application.quit
    release oword
    I also wrote a script to attempt to print it from the Adobe printer. It seems to work, but when I go to open the created pdf file it I get the following message:
    Acrobat could not open mypdf.pdf because it is either not a supported file type or because the file has been damaged.
    The code was this:
      Set oWordApp = CreateObject("Word.Application")
        Set oDocument = CreateObject("Word.Document")
        oWordApp.Visible = True
        oWordApp.Application.WindowState = wdWindowStateMinimize
        Set oDocument = oWordApp.Documents.Open("t:\cardeals\cardeals.doc")
        strOutputPDFName = "c:\mypdf.pdf"
        holdprtrdefault = oWordApp.ActivePrinter
        oWordApp.ActivePrinter = "Adobe PDF"
        oWordApp.Application.PrintOut FileName:="t:\cardeals\cardeals.doc", _
            Copies:=1, _
            Range:=wdPrintAllDocument, _
            Item:=wdPrintDocumentContent, _
            Pages:="", _
            PageType:=wdPrintAllPages, _
            Collate:=True, _
            Background:=False, _
            PrinttoFile:=False, _
            OutputFileName:=strOutputPDFName
    If I clkick on the PDFMaker icon iside word, the resultant file is BEAUTIFUL. Can I automate this from within word? If not, does PDFMaker have a command line utility that I could put in a batch file?

    I don't have an answer, but you might get a better response in the scripting forum.

  • Why can't I edit the Word doc I converted from a PDF?

    Why can't I edit the Word doc I converted from a PDF?
    Help! That is why I bought this software!

    Hi linda007,
    If you can't edit the file once it's converted to Word, it could be that the PDF was created from a scanned page, and then image text wasn't converted to searchable text. ExportPDF should perform Optical Character Recognition by default, but it can be disabled in Reader. Do you know whether OCR was disabled when you converted the page? If it wasn't, make sure that the correct language was selected for OCR. This option appears at the bottom of the ExportPDF panel in Reader, and in the Document Language (for Text Recognition) pop-up menu that appears after you select your file to convert in the ExportPDF online service.
    If everything seems to have been set correctly, and you still can edit the text, please try triple-clicking to select the text in Word. Did that do the trick?
    Best,
    Sara

  • How do I edit the wording in file or add to wording in file or Doc.

    Hoe di I edit wording in a file or doc.

    Thanks but I can edit in word without Adobe defeats the purpose.
           From: Sara.Forsberg <[email protected]>
    To: Samuel Iglecias <[email protected]>
    Sent: Monday, February 23, 2015 12:43 PM
    Subject:  how do I edit the wording in file or add to wording in file or Doc.
    how do I edit the wording in file or add to wording in file or Doc.
    created by Sara.Forsberg in Adobe Acrobat.com Services - View the full discussionHi samueli11326032, Do you have  PDF file or a Word document (.doc or .docx file) that you're trying to edit? To edit a PDF, you need to use Acrobat. If you have Word doc that you converted from PDF, you can download the file from your account at https://cloud.acrobat.com, so that you can open it and edit it in Microsoft Word. If you've made that far and are having trouble selecting/editing the text in Word, try triple-clicking in the text block that you want to edit. And, if I've completely misunderstood your question, let me know a bit more about the file that you're trying to edit it, and what software you're using, and I'll do what I can to get the issue resolved. Best,Sara If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7222389#7222389 and clicking ‘Correct’ below the answer Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7222389#7222389 To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"  Start a new discussion in Adobe Acrobat.com Services by email or at Adobe Community For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • [svn:fx-trunk] 10677: Fix for "In ASDoc, the word 'global' disappears from  @see link text"

    Revision: 10677
    Author:   [email protected]
    Date:     2009-09-29 08:09:49 -0700 (Tue, 29 Sep 2009)
    Log Message:
    Fix for "In ASDoc, the word 'global' disappears from @see link text"
    QE notes: None.
    Doc notes: None
    Bugs: SDK-23429
    Tests run: asdoc testsuite
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-23429
    Modified Paths:
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja va

    THank you , Nancy. Appreciate the input.
    So instead of this:
    <a class="brand" href="index.html"><img src="../img/logo-ca.png"alt="Consumers Advocate Review"> </a>
    Would it be something like this?:
    <a class="brand" href="index.html"><img src="http://ConsumersAdvocate/img/logo-ca.png"alt="Consumers Advocate Review"> </a>
    And if I do that, is there a way to cope with that locally so that DW can still display the images?
    jeff

Maybe you are looking for

  • PayPal Field Selection from a From

    Using Windows7, if a Form has many Fields within it, when I go to the PayPal activation Tab... and try to assign Form Fields to the PayPal presentation/calculation, the Dropdown List of Form Fields 'stops' vertically when it fills the screen (if ther

  • IPhoto is currently a shared file with another user on my Mac and I am the Admin and no longer want to share it. How do i undo this completely?

    Iphoto is currently a shared file on my Mac and I no longer want to share it. How do I completely remove access to it if i am the Admin to the computer? Thanks in advance...

  • h:messages layout="list" ... but no list

    Hi I want to display all form error messages at once as a list so I have <h:messages layout="list"> at the top of my form. According to docs layout attribute is explained as: The type of layout markup to use when rendering error messages. Valid value

  • Tree Node Icons

    This should be an easy one...but it's not working for me. When I specify an icon gif for a node in my tree, where does Forms 6i load it from? Thanks in advance!

  • Time Statement Form ABAP

    Weekly totals in ZPYXXFO_ZSAP_TIM_99_0001(smartforms-time statement form) have disappeared for the year 2011. And also, it cannot calculate beyound the date 2011/2/25. Could you please help me with this.