ch.uzh.ifi.attempto.acewiki
Class AceWikiServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by nextapp.echo2.webrender.WebRenderServlet
              extended by nextapp.echo2.webcontainer.WebContainerServlet
                  extended by ch.uzh.ifi.attempto.acewiki.AceWikiServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class AceWikiServlet
extends nextapp.echo2.webcontainer.WebContainerServlet

This servlet class should be launched by the web server in order to start an AceWiki application. If you are using a web application archive (WAR) then the web.xml file should contain something like this:

 <servlet>
   <servlet-name>GeoWiki</servlet-name>
   <servlet-class>ch.uzh.ifi.attempto.acewiki.AceWikiServlet</servlet-class>
   <init-param>
     <param-name>ontology</param-name>
     <param-value>geo</param-value>
   </init-param>
   <init-param>
     <param-name>baseuri</param-name>
     <param-value>http://attempto.ifi.uzh.ch/acewiki/</param-value>
   </init-param>
   <init-param>
     <param-name>title</param-name>
     <param-value>Geography Wiki</param-value>
   </init-param>
   <init-param>
     <param-name>description</param-name>
     <param-value>This wiki contains geographical knowledge.</param-value>
   </init-param>
   <init-param>
     <param-name>login</param-name>
     <param-value>no</param-value>
   </init-param>
 </servlet>
 
The parameter 'ontology' is mandatory and specifies the name of the ontology. This name is used in the URIs of the OWL statements and for the file names on the server. The 'baseuri' parameter defines the base URI for the OWL statements. The values of the parameters 'title' and 'description' are shown on the start page of the wiki. Finally, the 'login' parameter defines whether users have to login before they can use the wiki. Note that the login feature is implemented only very rudimentary.

Furthermore, SWI Prolog needs to be installed on the server and you need to have a compiled version of the Attempto APE distribution. See the documentation of APELocal for more information. The server has to know the command of your SWI Prolog installation and the location of the ape.exe file. This is done by context parameters in the web.xml file:

 <context-param>
   <param-name>prologcommand</param-name>
   <param-value>swipl</param-value>
 </context-param>
  
 <context-param>
   <param-name>apecommand</param-name>
   <param-value>/path/to/file/ape.exe</param-value>
 </context-param>
 
One last tiny thing: The server delay window (that is shown on the client when the server is busy) looks for the wait icon "../wait.gif". You should copy the file "src/ch/uzh/ifi/attempto/acewiki/core/gui/img/wait.gif" to the respective folder on the server. (This should be improved, I admit.)

Author:
Tobias Kuhn
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class nextapp.echo2.webrender.WebRenderServlet
nextapp.echo2.webrender.WebRenderServlet.MultipartRequestWrapper
 
Field Summary
 
Fields inherited from class nextapp.echo2.webrender.WebRenderServlet
DISABLE_CACHING, SERVICE_ID_DEFAULT, SERVICE_ID_NEW_INSTANCE, SERVICE_ID_PARAMETER, SERVICE_ID_SESSION_EXPIRED
 
Constructor Summary
AceWikiServlet()
          Creates a new AceWiki servlet object.
 
Method Summary
 nextapp.echo2.app.ApplicationInstance newApplicationInstance()
           
protected  void process(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class nextapp.echo2.webrender.WebRenderServlet
doGet, doPost, getActiveConnection, getMultipartRequestWrapper, getServiceRegistry, setMultipartRequestWrapper
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AceWikiServlet

public AceWikiServlet()
Creates a new AceWiki servlet object.

Method Detail

newApplicationInstance

public nextapp.echo2.app.ApplicationInstance newApplicationInstance()
Specified by:
newApplicationInstance in class nextapp.echo2.webcontainer.WebContainerServlet

process

protected void process(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws java.io.IOException,
                       javax.servlet.ServletException
Overrides:
process in class nextapp.echo2.webrender.WebRenderServlet
Throws:
java.io.IOException
javax.servlet.ServletException


Copyright 2008, Attempto Group, University of Zurich (see http://attempto.ifi.uzh.ch)