Setting up Pixenate on a J2EE server which doesn't support CGI

If you would like to run Pixenate on a J2EE server which doesn't support CGI, please follow these steps...

Tomcat 6

  1. In the pixenate/cgi-extra/ directory there is a file called pxn8.jsp. Copy this file to the pixenate/ directory.
  2. Open the pixenate/pxn8.jsp file in an editor and add the following code at the top of the java block...
    String script = "YOUR_ABSOLUTE_PATH_TO_PXN8.PL_SCRIPT";
    ... inserting your own absolute path to the pxn8.pl script. (see examples for Sun App Server and Tomcat already provided in the source).
  3. Change the perlExe String value to the absolute path to perl on your machine. e.g. "C:\\Perl\\bin\\perl.exe".
  4. In your editor JSP page, (e.g. pixenate/themes/slick/index.jsp) add the following javascript code before the call to PXN8.initialize()...
    PXN8.basename = "pxn8.jsp";
  5. In a browser, visit the URL http://localhost:8080/pixenate/pxn8.jsp. (changing the servername, port and path to match your own install). The output should look something like this...
    { "width" : -1, "status" : "ERROR", "opNumber" : 0, "errorMessage" : "No script supplied",...
    ... if you get the following error message...
    Unable to load server-side pixenate perl modules...
    ... please refer to Troublshooting.
  6. In a browser, visit your local editor page (the one you changed in step 4) and try to edit a photo (e.g. rotate). The editor should change the photo without problem.

Sun App Server 8

The steps to setup Pixenate on Sun's App Server 8 are the same as Tomcat 6. You need to perform the following additional step...

Change your domain's policy file (the policy file is found in domains/${DOMAIN_NAME}/config/server.policy) as follows...

Find the following line under the global grant statement ...

	permission java.io.FilePermission       "<>", "read,write";
... and change it to ...
	permission java.io.FilePermission       "<>", "read,write,execute";
Restart the domain server so that the new permissions are granted.