My question is: How to get the URL
http://localhost/Alpha (no :8080) to run the Java servlet /MyPath/Whatever/Beta.class
What is the chain of linkages required?
I don't use CVS, I don't use Ant, I don't use JSP,
I am not using the Tomcat Manager.
But I can be root and edit any file on the hard disk.
Yes I've read the Tomcat documentation.
it is tool-oriented and confused and sometimes wrong.
I have Ubuntu Linux 10.04
and Apache 2.2.14
and Tomcat6 6.0.24.
FYI I can configure apache2 to alias /Alpha to /MyPath
and so it run /MyPath/index.php which consists of
<?php
system( "java Beta" )
?>
but in that case Beta is not a sevlet,
just an ordinary Java program.
Bear Bibeault wrote:Chnage Tomcat to listen on port 80
I can try this. But won't it interfere with Apache serving up my other web sites? On the web is a blog from 2001 saying that to get Apache to talk to Tomcat I have to recompile Apache, but of course that is rediculous.
Bear Bibeault wrote: map the servlet properly in the deployment descriptor.
By "deployment descriptor" do you mean
$CATALINA_BASE/conf/server.xml
or $CATALINA_BASE/conf/web.xml
or $CATALINA_HOME/webapps/default_root/META-INF/context.xml
or /MyPath/WEB-INF/web.xml
or /MyPath/META-INF/context.xml
The sample web.xml file has sample <servlet-mapping> entries but they do not seem to have any concept of a disk directory. So how does Apache (or Tomcat) know that when it sees "Alpha" it must look to "/MyPath"?
The DD for your web app would be /MyPath/WEB-INF/web.xml. In it you need appropriate <servlet> and <servlet-mapping> elements; if you're not sure how those work, see the servlets-examples web app that comes with Tomcat, or consult a servlet tutorial.