[Attempto] Running ACE Editor or ape.exe in a localhost via Java Server Pages

Adam Wyner adam at wyner.info
Thu Apr 8 15:58:34 CEST 2010


Hi ACE community,

We are working on a project in which we want to incorporate ACE Editor
into an online service in which users can launch ACE Editor from a
webpage.  The output of ACE Editor would be stored in a database for
further processing.  Launching ACE Editor ought to be similar to the way
it is launched from the ACE Editor button online:

http://attempto.ifi.uzh.ch/site/tools/

However, we want to launch ACE Editor from within another application (a
multi-threaded discussion list) using JavaServer Pages.  We are using
ACEEditorServlet from the ACE Java package.  We are encountering some
problem getting ACEEditorServlet to launch.  We think that perhaps there
are input parameters, configuration, executable files, or processes that
must be executed before the servlet is started?  However, we cannot find
documentation on these.  We've looked in the online forums and
documentation, but have not yet found the solution.  Perhaps the issues
are similar to the problems others encountered with the ACE Wiki set up?
See the google search for:

site:lists.ifi.uzh.ch servlet

Details of our set up are below (in both Windows and Ubuntu). Our
database, web server, SWI-Prolog, ACEEditor.java, ACEEditorServlet.java,
jsp pages are ready to use. These are prepared to be utilized in the
localhost.  From ACE java documents, ACEEditorServlet.java is the
starting point to run an online ACE Editor through a browser such as IE
or Firefox. We have a very simple JSP page (see below) and called this
servlet to run the online ACEEditor in the localhost, but we received
the below error message:

"An application error has occured. Your session has been reset."

We don't know what this error means.

We looked at the web server error log files which is an instance of
Apache Tomcat version 6.0.  In particular, in one of the Tomcat log
files called localhost......log, we found two error messages (1)
Servlet.service() for servlet ACEEditorServlet threw exception  and (2)
java.lang.UnsatisfiedLinkError: no jpl in java.library.path.  Error
message (2) belongs to SWI-Prolog.  These errors seem to be caused by a
failed call to ape.exe from within ACEEditorServlet.
ACEEditorServlet.java calls a version of ape.exe, which calls part of
SWI-Prolog to interprete ACE sentences.

To overcome the errors, we tried to run the following command of
httpserver version of ape.exe in Ubuntu (it does not run in our Windows
set-up):

nohup swipl -x ape.exe -- -httpserver -port 8001 > stdout.txt 2>
stderr.txt &

We have our running Apache Tomcat web server in port 8090, and ape.exe
httpserver in port 8001.  While the server is running, we tried to run
our JSP file which calls the ACEEditorServlet to be executed in the
browser.  But we still get the same error messages.

The JSP file we used was:

<%@ page language="java" pageEncoding="UTF-8" contentType="text/html;
charset=UTF-8"
import="ch.uzh.ifi.attempto.aceeditor.*, ch.uzh.ifi.attempto.ape.*" %>
<html>
<body>
<form METHOD="Post" ACTION="servlet/ACEEditorServlet">
<INPUT TYPE="SUBMIT" VALUE="Submit">
</form>
</body>
</html>

Meanwhile, we use the following configurations:

1- Ubuntu 9.10 and Windows XP service pack 3.0
2- JDK and JRE 6.0 last update (update 6.0.18)
3- Apache Tomcat version 6.0 in both operating systems
4- SWI-Prolog and ape.exe, last version
5- MySQL version 5.1
6- Internet Explorer version 8 and firefox 3.6.3.
7- Servlet, versions 2.5 and 2.4
8- Our modified version of ACEEditor.java and ACEEditorServlet.java

Please let us now about any suggestions.

Thanks,
Kiavash, Adam, and Tom
Univ. of Amsterdam
Leibniz Center for Law 



More information about the attempto mailing list