Skip to content

RunningTheWebappInTomcat

Nicholas Bergson-Shilcock edited this page Jul 19, 2011 · 11 revisions

Install Tomcat 6 in whatever way you prefer. Apt-get works great on Debian-based systems.

Edit opentripplanner-api-webapp/src/main/resources/data-sources.xml to point to where your graph will live once you build it with the GraphBuilder.

Build everything with mvn package -DskipTests.

Use the Tomcat manager webapp to upload the opentripplanner-webapp.war and opentripplanner-api-webapp.war files.

If you are using Tomcat security, edit your Tomcat security policy, which probably lives in /etc/tomcat6/policy.d/*.policy .

Add the following:

grant codeBase "file:${catalina.base}/webapps/opentripplanner-api-webapp/-" {

     permission java.io.FilePermission "/var/lib/opentripplanner/-","read"; /* location of Graph.obj */



     permission java.util.PropertyPermission "org.apache.commons.logging.LogFactory.HashtableImpl", "read";

     permission java.util.PropertyPermission "com.sun.jersey.core.util.ReaderWriter.BufferSize", "read";



     /* there aren't fatal -> webapp still runs w/o them... */

     permission java.util.PropertyPermission "org.geotools.referencing.epsg-datasource", "read";

     permission java.util.PropertyPermission "org.geotools.referencing.crs-directory", "read";

     permission java.util.PropertyPermission "org.geotools.referencing.forceXY", "read";



     permission java.lang.reflect.ReflectPermission "suppressAccessChecks";



     permission java.lang.RuntimePermission "shutdownHooks";

     permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.util.http";

};

The documentation on this wiki is outdated and should not be used

unless you are intentionally working with legacy versions of OpenTripPlanner. Please consult the current documentation at readthedocs

Clone this wiki locally