Table of Contents
To install and run FOP Editor, first you have to add FOP Editor applet and fopes application to Enhydra Multiserver application.
FOP Editor applet consists of HTML files, applet class files and resources (gif and property files). To add applet to Enhydra Multiserver you have to set “Class Name” to org.enhydra.servlet.servlets.FileServerServlet and “DocRoot” to directory where are HTML files placed (see Enhydra Multiserver Help documentations). After that, you should to set connection and start this applet from Multiserver GUI. In FOP Editor applet DocRoot directory, there is index.html file which will be invoked by default when you call FOP Editor applet.
Adding a fopes to Enhydra Multuiserver is similar like adding FOP Editor applet. It is only important to set appropriate port of application on exactly that port which is defined in HTML (see next section).
In all HTML files there are some predefined values for http address of Enhydra Application. These values are http://localhost:8011/ServletEditor.po. You should change localhost to name of computer where Web server is installed and 8011 to number of registrated port on which fopes application is running.
If you want to be able to use cut, copy and paste functions in interaction with other applications and system, then you should to enable these Java permissions on your system. There are two ways to do this. In one of them, you have to copy the file .java.policy at your HOME directory (under Windows it will be c:\Documents and Settings\user_name ). This file is in Misc directory of FOPEditor.zip archive.
Other way is to editing Java security file. Path to this file is <JRE>/lib/security/java.policy (for e.g. c:/Program Files/Java/J2re1.4.0/lib/security/java.policy). Following line has to be put:
permission java.awt.AWTPermission "accessClipboard", "access";After that, applets are permitted to use system clipboard.
Like it is said before in Introduction, it is possible to generate PDF from FOP Editor applet or by submiting a parameters from address bar. If you run FOP Editor applet, you can generate PDF file if you click on “Generate PDF” button. In this case, whole contents of applet and all input fields form HTML form will be submited. Second way to generate PDF is to submit a FO file to fopes application. Example:
http://zmaj:8011/ServletEditor.po?fo=c:\Examples\test.fo. Finally, third way to generate PDF is to submit XML and XSL file to fopes application. Example:
http://zmaj:8011/ServletEditor.po?xml=c:\Examples\test.xml&xsl=c:\Examples\test.xsl