Using the servlet to convert DOCX files

Let’s suppose your servlet container runs on host localhost and uses 8080 as its port. In order to use the “Word To XML” servlet, please point your Web browser to http://localhost:8080/w2x/. This will cause the browser to display a page containing a simple DOCX convert form.

The Convert DOCX form (servlet container running on host 192.168.1.202 and using port 8080)

???

In order to convert a DOCX file to another format:

  1. Click “Choose File” to select the DOCX file to be converted.
  2. Select the desired output format using the “Output format” combobox.
  3. Click Convert to download a .zip (or .epub) archive containing the result of the conversion. Generating this .zip (or .epub) file may take several seconds to several minutes depending on the size of the DOCX input file.

If the name of the DOCX input file contains non-ASCII characters (e.g. accented characters), please make sure to use Zip extractor software supporting .zip files having UTF-8 encoded filenames.

Note that most Zip extractor software do not support .zip files having UTF-8 encoded filenames[1]. Such extractors will succeed in unpacking the .zip file, but will generate files having incorrect names.


[1]However, “jar xvf converted.zip” works fine. jar is a command-line utility which comes with all Java Development Kits (JDK).