Tomcat Extension for Custom Runtime Loading
Users can deploy custom run times on tomcat with this extension. As an example we can run jaggery application using this extension.
Follow below steps to run jaggery web apps on tomcat.
-
Open the server.xml file (stored in the <Tomcat_HOME>/conf directory).
-
Add the following under the server tag:
<Listener className="org.wso2.appserver.configuration.listeners.ServerConfigurationLoader"/>
-
Open the context.xml file (stored in the <Tomcat_HOME>/conf directory).
-
Add the following under the Context tag:
<Listener className="org.wso2.appserver.configuration.listeners.ContextConfigurationLoader"/>
-
Add the below lines under the Context tag: `<Loader className="org.wso2.appserver.webapp.loader.AppServerWebappLoader" loaderClass="org.wso2.appserver.webapp.loader.AppServerWebappClassLoader"/>
`
-
Copy <project_root>/modules/custom-run-time-loader/target/custom-runtime-loader-1.0.0-SNAPSHOT-fat.jar to <Tomcat_HOME>/lib folder.
-
Copy <project_root>/modules/custom-run-time-loader/src/main/Resources/jaggery/org.jaggeryjs.jaggery.tomcat.listener-0.13.0.jar to <Tomcat_HOME>/lib folder.
-
Copy <project_root>/modules/custom-run-time-loader/src/main/Resources/runtimes folder to <Tomcat_HOME>/lib folder.
-
Copy <project_root>/modules/custom-run-time-loader/src/main/Resources/wso2 folder to <Tomcat_HOME>/conf folder.
-
Copy <project_root>/samples/jaggerySamples/target/coffeeshop.war to <Tomcat_HOME>/webapps folder.
Now start the server and you should be able to access the application by going to
http://localhost:8080/coffeeshop