Configuring Tomcat for PrologBeans

This section will briefly describe how to set up a Tomcat server so that is it possible to test the example JSPs. Some knowledge about how to run Tomcat and how to set up your own web application is required. Detailed information about Tomcat is available at

Assuming that you are positioned in the Tomcat installation directory, do the following:

  1. Add the prologbeans.jar to the common/lib/ directory. Note that this will give all Tomcat applications access to the PrologBeans system. There are other options for importing prologbeans.jar that might be better for your type of application.
  2. In the conf/server.xml file add the following (after the Tomcat Root Context tags - shown as the first lines below):
              <!-- Tomcat Root Context -->
                <Context path="" docBase="ROOT" debug="0"/>
                 <Resource name="prolog/PrologSession" auth="Container"
                 <ResourceParams name="prolog/PrologSession">
    This will register a PrologSession instance under the name prolog/PrologSession so that it is possible to do a JNDI lookup.
  3. In your application's web.xml file, found in Tomcat's webapps/your_application/WEB-INF directory, you need the following resource reference:
  4. Copy the example JSP files that you want to use (sessionsum.jsp and evaluate.jsp) into the Tomcat web application directory (webapps/your_application).
  5. Start the Tomcat server.
  6. Start the example that you want to test (pbn-exa shows how to start one of the examples).