1*b1cdbd2cSJim JagielskiServlet for converting documents 2*b1cdbd2cSJim Jagielski================================ 3*b1cdbd2cSJim Jagielski 4*b1cdbd2cSJim JagielskiBuild preparation: 5*b1cdbd2cSJim Jagielski================== 6*b1cdbd2cSJim JagielskiIn the file "ConverterServlet.html", search for the following line: 7*b1cdbd2cSJim Jagielski<form action="http://localhost:8080/conversion/servlet/ConverterServlet" method=post enctype="multipart/form-data"> 8*b1cdbd2cSJim JagielskiReplace the existing IP address (localhost) with your intended IP address. 9*b1cdbd2cSJim Jagielski 10*b1cdbd2cSJim JagielskiInstallation instructions: 11*b1cdbd2cSJim Jagielski========================== 12*b1cdbd2cSJim Jagielski1. If no web server is available you should install your favourite web server. 13*b1cdbd2cSJim Jagielski The example was tested with a Tomcat 4.1 server (http://jakarta.apache.org/tomcat/) 14*b1cdbd2cSJim Jagielski2. Download the servlet support Java archive (cos.jar) from 15*b1cdbd2cSJim Jagielski http://www.servlets.com/cos/index.html and copy the file to the directory 16*b1cdbd2cSJim Jagielski <OFFICE_HOME>/program/classes. If you don't use the created WAR (WAR = simple web archive file, it 17*b1cdbd2cSJim Jagielski is similar to a normal Jar file) file, please make these classes also known to your web server. 18*b1cdbd2cSJim Jagielski3. You need also the Servlet API (servlet.jar). The Tomcat server comes with this Servlet API. Please 19*b1cdbd2cSJim Jagielski copy the file "servlet.jar" to the directory <OFFICE_HOME>/program/classes. 20*b1cdbd2cSJim Jagielski If you don't use the Tomcat server, make sure that the Servlet API is in the classpath of your web 21*b1cdbd2cSJim Jagielski server. You can download the Servlet API from http://java.sun.com/products/servlet/index.html . 22*b1cdbd2cSJim Jagielski4. Use your GNU make (http://www.gnu.org) to build the servlet class. 23*b1cdbd2cSJim Jagielski5. Make the servlet class known to your web server. 24*b1cdbd2cSJim Jagielski The example creates also a WAR file which can be easy deployed in a Tomcat server. 25*b1cdbd2cSJim Jagielski 5.1 Browse the 'Tomcat Web Application Manager' 26*b1cdbd2cSJim Jagielski 5.2 Navigate into the section 'Upload a WAR file to install' 27*b1cdbd2cSJim Jagielski 5.3 Browse to your generated WAR file and select it 28*b1cdbd2cSJim Jagielski 5.4 install it 29*b1cdbd2cSJim Jagielski 30*b1cdbd2cSJim Jagielski 31*b1cdbd2cSJim JagielskiConverting documents with the servlet: 32*b1cdbd2cSJim Jagielski====================================== 33*b1cdbd2cSJim Jagielski1. Browse your web server "http://<your_ip>/conversion/ConverterServlet.html" or 34*b1cdbd2cSJim Jagielski open the file "ConverterServlet.html" in your web browser and select a file. 35*b1cdbd2cSJim Jagielski2. Select a type to convert the file to, and the extension for the converted file. 36*b1cdbd2cSJim Jagielski3. Press the button. The document will be uploaded to the server, converted and 37*b1cdbd2cSJim Jagielski pushed back to the client. Your browser will open a dialog for saving the 38*b1cdbd2cSJim Jagielski converted document. 39