Jaxer support can be added to Apache Tomcat via the inclusion of two WAR files.
Configuring Tomcat and Jaxer
Copy the jaxer.war and jaxer-server.war files into your webapps directory in your Tomcat home directory.
Configuring the two web.xml files in these war files allows you to connect the Jaxer servlet and Jaxer filter with your running Jaxer server. The two most common parameters that may need to be changed will be the hostname and port of your currently running Jaxer server. The included web.xml files use localhost and 5370 by default.
Jaxer Filter Parameters configured via the init-param element in the web.xml:
JAXER_PORT - the connector port of the Jaxer serverJAXER_HOSTNAME - the hostname of the Jaxer serverIGNORE_PATHS - a list of path segments that when encountered should bypass being processed by JaxerREQUEST_PATH - the request path of the Jaxer callback, only needed when using the JaxerFilter as a callback filterJaxer Servlet Parameters configured via the init-param element in the web.xml:
REQUEST_PATH - the request path of the Jaxer callback that should be handled exclusively by the Jaxer servletNecessary WAR files:
jaxer-server.warWEB-INFweb.xmllibjaxer.warWEB-INFweb.xmllibInclude Jaxer-Tomcat sample
The jaxer-server.war is required to run any Tomcat applications through Jaxer. It provides the handlers needed for any Jaxer callbacks used by your pages. The jaxer.war file contains two samples of integration between Jaxer and Tomcat. The console.html file contains a simple console written in HTML that uses Javascript and the Jaxer Framwork to run entered content as a JSP page and view the results. The index.html shows a sample is mixing client-side JavaScript, server-side JavaScript, and JSP to create a simple application that allows users to translate date and number formats to their current locale.
Once you install the WAR files open a browser to http://<TOMCAT_ADDRESS>/jaxer/ or http://<TOMCAT_ADDRESS>/jaxer/console.html to view the sample applications.
How do I use Tomcat in Aptana Studio?
Files inside the project can now be previewed against your Tomcat server inside the HTML editor.
Servlet Souce code:
The source code for the Jaxer filter and servlet code can be found at the following SVN urls:
The com.aptana.ide.framework.jaxer.server.servlet package in the Jaxer plugin
The com.aptana.ide.server.jetty.interfaces package in the Jetty plugin
| Attachment | Size |
|---|---|
| jaxer-server.war | 79.18 KB |
| jaxer.war | 93.23 KB |