Load a .doc file and transform to an .html

Hi all,
I'm develop a web application but I have two problems, with a JSP I need load a file with extension .doc and save it in the server (upload files) but I don't know how to do that.
Actually I use an AccessRandomFile and ByteArrayOutputStream objects to write the file but when I open it the information in the file appears with extrange symbols. How can I do to write correctly the file .doc in te server?
And the second problem is, when the file .doc are in the serever I need to convert the file to an .html file. How can i do it?
Thanks.

You know one thing you can do is simply require the user to provide an HTML file, rather than an Word file. Word has a "save as html" option.
Anyway...
This looks promising for the document conversion part:
http://jakarta.apache.org/poi/
You can use this for file upload on the server:
http://jakarta.apache.org/commons/fileupload/

Similar Messages

  • Loading different flat files and consolidate in one BEX

    I want to know in SAP BW how is the best way to load different flat files and loading them into a Consolitaded Infocubes o DSO to show in a Bex report. This files have the same estructure.

    you need to create a datasource with the exact structure of your files... then this datasource will be linked with your cube via transformation.... you need to define the characters, key figures and time character ..
    load file to datasource.. then to cube....then it will be available for reporting

  • Understanding compile errors due to copying code from a doc file and not a txt file

    SITUATION:
    My instructor for my micro-controller class refuses to save sample code to a text file and instead saves it to a word document file instead. When I open up the doc file and copy/paste the code into my IDE "CodeWarrior" it causes errors upon compile time.
    I am having to rewrite all the code into a text editor and then copy/paste it into my IDE.
    MY UNDERSTANDING:
    I was told to always save code as a text file because when you save code as a word document file it will bring in unwanted characters when your copy/pasting the code into your IDE for compiling.
    Their are students in my class using the schools computers running "Windows" that copied and pasted the code into CodeWarrior and it compiled fine. This is not only frustrating but confusing. However, I know their are students in class with "PC's" running windows that had the same trouble I did so I know it's not a Mac issue. 
    Also I am running "Parallels" because my IDE for this micro-controller "Code Warrior" is not avaiable for my OS. I realize there are several IDE's out there that require "Windows OS" in general but I know this situation is not a Mac issue or Parallels issue or even a Windows issue. It's purly an issue of formatting that is done between the file being copied and the target program or so I'm understanding.
    Can someone exlain to me in better words or perhaps provide a resource, documentation or article that will enlighten me on this issue. I would like to better state my case next time. I'm tired of being told this is a MAC issue and that Windows is just plain better.

    The problem is (as you suggest) almost certainly a gremlin issue - characters that for one reason or another Code Warrior cannot interpret correctly. Why it happens to you and not others is a different matter. That could mean that the pofessor uses fonts that are not on your machine, or that he is using a different version of word, or it could be in how you access the data. For instance, if the prof posts this word doc on the web you may get different results if you download the file and open it in Word as opposed to opening it directly from a web browser.
    The sure-fire solution is to download TextWrangler and copy the code in there first. TW has a number of tools for finding and removing unpleasant characters. it adds a step, but... you could also try resaving the doc file as a plain text file from within word.

  • Loading a CSV file and accessing the variables

    Hi guys,
    I'm new to AS3 and dealt with AS2 before (just getting the grasp when the change it).
    Is it possible in AS3 to load an excel .csv file into Flash using the URLLoader (or ???) and the data as variables?
    I can get the .csv to load and trace the values (cell1,cell2,cell3....) but I'm not sure how to collect the data and place it into variables.
    Can I just create an array and access it like so.... myArray[0], myArray[1]? If so, I'm not sure why it's not working.
    I must be on the completely wrong path. Here's what I have so far....
    var loader:URLLoader = new URLLoader();
    loader.dataFormat = URLLoaderDataFormat.VARIABLES;
    loader.addEventListener(Event.COMPLETE, dataLoaded);
    var request:URLRequest = new URLRequest("population.csv");
    loader.load(request);
    function dataLoaded(evt:Event):void {
        var myData:Array = new Array(loader.data);
        trace(myData[i]);
    Thanks for any help,
    Sky

    just load your csv file and use the flash string methods to allocate those values to an array:
    var myDate:Array = loader.data.split(",");

  • Read a doc file and write back to a doc file

    How to read line by line from a doc file and then arrange it.
    Like-->
    amit
    sumit
    prem
    jeev
    these four names are present in the doc file. Now how to read by means of java program and sort these names and write back to a new doc file?????
    What packages and methods are to be used??
    Please help.....
    Edited by: Jaguar on Apr 11, 2011 12:16 AM

    Jaguar wrote:
    How to read line by line from a doc file and then arrange it.By 'doc' do you mean MS Word?
    these four names are present in the doc file. Now how to read by means of java program and sort these names and write back to a new doc file?????You seem to have a sticky '?' key and an unreliable shift key (to apply an upper case letter to the start of every sentence). Please fix them.

  • Does Acrobat Pro read the content in pdf file and transforms it?

    Does Acrobat Pro read the content in pdf file and transforms it to xls file without the need for much changes or manual work?

    Acrobat X (Standard and Pro) will save tabular data to XLS or XLSX format, provided it can recognize the table as being a table. If the PDF has missing or incorrect structure tags, Acrobat will try to guess the table layout by the position of text and lines on the page - this works well for basic formatting but if the table has complex styling, spanned cells etc. it can lead to problems.
    Acrobat X will even attempt to export a table within a scanned document, by applying OCR during the export stage - though again this relies on the table being visually identified.
    See http://www.adobe.com/products/acrobatpro/pdf-to-word-excel-converter.html and this article on how to extract one table from a larger document.

  • Why when i connect my phone to my laptop do my recent photos load as image files and not jpeg

    why is it that when i connect my phone to my laptop my recent photos load
    as image files and not jpeg as they used to.Is this another issue with ios 8

    Thank you. I did that and made sure my phone was open to the camera roll. I was able to locate the import command and the photos appeared. Thanks so much!

  • When right clicking on a doc file and choosing create a pdf file....Word 2013 launches and creates problems. We are using Acrobat Pro. Is there a way to turn off this feature in Word 2013?

    Is there a way around Word 2013 hijacking Acrobat Pro "create a pdf" process? When right clicking on a doc file and choosing "create a pdf" .......the Acrobat process will beging but then Word 2013 jumps in and creates problems.

    That's exactly why it needs to support it... The support means the
    application was tested in the supported environment and is known to work
    well in it. In unsupported environments you can get all kind of strange
    conflicts like the one you're experiencing.
    On Tue, Apr 21, 2015 at 7:27 PM, timmm4731946 <[email protected]>

  • I have just load form Pdf file and saved try to sign or type the form,it will not let me?

    Downloaded PDF file and try to type the form or sign the form, it it will not let me?

    From: Pat Willener [email protected]
    Sent: 11 December 2012 02:36
    To: chandabajaj
    Subject: I have just load form Pdf file and saved try to sign or type the form,it will not let me?
    Re: I have just load form Pdf file and saved try to sign or type the form,it will not let me?
    created by Pat Willener <http://forums.adobe.com/people/pwillener>  in Adobe Reader - View the full discussion <http://forums.adobe.com/message/4911163#4911163

  • Load data from file and send to background

    Hello, is it possible to load data from a file on the presentation server and then create a batch input to call a transaction with those values but on background NOT using data set?
    Thanks in advance.

    U can surely design the process to be executed in various ways..one of them is as below ::
    Upload ABAP.
    1. It reads the file from the presentation server and exports it into INDX database with a specific filename.
    2. Updates a ztable with user/upload date and time/filename/status=U.
    Batch ABAP.
    1. It reads the ztable for all the files with status=U.
    2. Using the filename IMPORTS the data from INDX database.
    3. Creates the batch input to call transaction.
    4. Sets the status as process along with process date and time.
    With the above you can have multiple uploading data and batch job picking up each file and doing the needful.
    Regards
    Anurag

  • Using a container to load several swf files and play them

    I need some help. I want to use several swf files and have them be called upon in a container file and play them in sequence. It's a presentation that needs to play thru but still have the ability to stop, click on items, open a popup and then continue on in the presentation. I am building all the individual "chapters" and their "sub-chapters" as swf files, with the hope that I can load them in order. I am relatively new to AS3. Help?

    If you will be loading swf files into a container then you will use the Loader class to accomplish that, so give that a looking over in the help documents and see what you can do.  If you have a problem getting it to work, post your code and describe what you have done.

  • Can ResourceBundle load .properties from files and .jar?

    Hi Guys,
    I'm trying to I18N an application with ResourceBundle.
    Suppose my class look like this:
    package pack;
    import java.util.ResourceBundle;
    public class MyClass {
        public static void main(String[] args) {
            ResourceBundle rb = ResourceBundle.getBundle("Language");
    }This would load the localized string from Language.properties
    And when I pack the class file and Language.properties into a jar. It works fine
    But what I tried to do is to make the ResourceBundle try to load from external file first
    before it load from the jar file so that if I have a new language file I can just drop in the
    NewLang.properties.
    Inside .jar file look like this
    /Language.properties
    /pack/MyClass.class
    /meta-inf/Manifest.mf
    I tried look into some forum and they suggest to include Class-Path in Manifest.mf file
    to include current path like this
    Class-Path: .
    But still, it didn't work. If I include .properties in .jar it will not look outside but if I didn't include
    any .properties it found a properties file.
    How can I achieve this ?

    Dave,
    I reckon you're on the right track... just have to figure out "what's the path to properties file"... I suspect you've got a context problem... not sure... I'm pretty new at this stuff myself.
    So, what's your development environment? O/S, IDE, app/web-server, etc.
    Cheers. Keith.

  • How to load word .doc-files into java applications?

    Hi,
    I want to load a word .doc-file (or any other type of document) into a java application, as part of the application.
    Is there any java special library to do it?
    Any solution or hint?
    Thank you.

    No, there is no existing Java library to do it that I am aware of. You could write your own, however, as the Word 97 binary file format is published. I am not sure that the Word 2000, or XP formats are as well, but since they put out the 97 presumably they'd do the same with the rest -- although I am suprised that Micro$$$oft even published the 97 format.
    A library such as this would take quite some time write, due to the extensive format, but here's a link to a copy of it just so you can see what it'd take: http://www.redbrick.dcu.ie/~bob/Tech/wword8.html
    Also keep in mind that Micro$$$oft has never remained binary compatable between versions. In short, this means that you'd have to parse each version's documents differently. Not a fun task.
    If a Java library to read Micro$$$oft file formats already does exist, I'm willing to bet that it costs $$$ mucho dinero $$$.
    Hey, aren't proprietary file formats just wonderful?

  • 1013 File Adpter pick .pdf, .doc files and make it available in Worklist

    Hi,
    I am using 10.1.3 version. I have a file adapter that polss on a directory and picks up any file dropped in the folder can doc, pdf. I have a Human Task that a user looks at a file and then APPROVE or REJECT or if possible make changes to a file too.
    Now how do I pick-up a file using File Adapter and make it available in Human Task (Worklist). I did look at DocumentReview Sample but it accepts some URL as a parameter but in my case I want to have a file i.e. pdf, doc etc. How can I handle this. Any help is appreciated.
    Thanks

    Hi Jasmin,
    I can add the converted document to PDF as a attachment to the XDP form in the workspace.
    I am strugling now with that envelope (the XDP), cant render it to PDF and than workspace enable it. I will have a look around the web because it will be there. One question is can I control permitions on the attachment? I want just read only permitions.
    Thanks Jasmin for your continuous help.
    J

  • Saving HTML with DIV to DOC file and display correctly

    I'm generating a DOC file of HTML. I happen to use DIV and
    CSS to make it look the way I want it to, but MS WORD is ignoring
    the formating.
    MS Word 2000

    You might want to provide some more details if you expect a
    useful response. I've generated Word files using ColdFusion and
    haven't had any problems with the styles. You might want to try
    creating a document in Word, saving it as HTML, and then seeing
    what the styles look like. Keep in mind that you have different
    units of measurement for print (points and inches instead of
    pixels) that could affect a document.

Maybe you are looking for