See What is Tomcat and how do I install it?
/usr/local/tomcat/conf/server.xml
<Context path="/ptolemyj" docBase="/home/www/java/ptolemy" reloadable="true" crossContext="true"> <Listener className="org.apache.ajp.tomcat4.config.ApacheConfig" forwardAll="true" noRoot="true" jkDebug="info" append="true"/> <Logger className="org.apache.catalina.logger.FileLogger" verbosity="4" prefix="ptolemyj_log." suffix=".txt" timestamp="true"/> <Parameter name="appURLBase" value="/ptolemyj" override="true"/> </Context>
/usr/local/apache/conf/tomcat-mod_jk.conf
and
/usr/local/tomcat/conf/auto/mod_jk.conf
JkMount /ptolemyj ajp13 JkMount /ptolemyj/* ajp13
/usr/local/apache/conf/rewrite.conf
:
RewriteCond %{REQUEST_FILENAME} !/ptolemyj/
/etc/init.d/apachectl graceful /etc/init.d/tomcat stop /etc/init.d/tomcat start
https://chesstst.eecs.berkeley.edu:444/ptolemyj
In the Infrax FAQ, Allen wrote:
Your servlet should have a fully-qualified class name like gsrc.foo.blah.MyServlet, and be installed under the root directory of all the website Java classes, which is /home/www/gsrcwww/java/WEB-INF/classes. So, from that directory, it should be gsrc/foo/blah/MyServlet.class.
To deploy your servlet, a <servlet>...</servlet>
section must be added to
/home/www/gsrcwww/java/WEB-INF/web.xml,
to map the servlet name
of your chosing (to be used in the servlet's URL) to the fully-qualified
class name.
Those sections of that file for the GSRC website are maintained under
the javapages CVS module.
Check out that module with the command,
cvs -d :ext:gigasource.eecs.berkeley.edu:/home/cvs checkout javapagesGo to the directory, javapages/gsrc/conf and add the new section to the file, web_xml.section, using existing sections as examples. For example, here is the section for the WorkshopRegistration servlet:
<servlet> <servlet-name> WorkshopRegistration </servlet-name> <servlet-class> gsrc.workshop.WorkshopRegistrationServlet </servlet-class> </servlet>The servlet is accessed by the URL, "http://www.gigascale.org/gsrc/servlet/WorkshopRegistration".
Run make install
to install the changes into
/home/www/gsrcwww/java/WEB-INF/web.xml.
After installing the servlet class file and the changes to the web.xml file, restart Tomcat to make the servlet available. To do that, do the following as root on gigascale:
# /etc/init.d/tomcat stop
# /etc/init.d/tomcat start
After verifying the the servlet can be invoked from a browser, commit your changes to web_xml.section.