[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

servlet via apache



Dear Lists;
 
Recently I configure my FreeBSD-4.10 Release box to host jsp page via
Tomcat-5.0, Apache-2.0 and mod_jk2.and java-mysql-conector
Everything is install form ports except Tomcat-5.0.
Now I can serve *.jsp page via Apache-2.0, but I have some trouble when
try to serve servlet page. 
Everytime I execute servlets-examples, ie: Hello World  (taken from
servlet Tomcat source), I'm  ending with "the page cannot be found".
But success with jsp-examples.
Please help me to configure my apache-tomcat so it's can serve servlet.
This is my server.xml.
 
ns2# cat server.xml
<Server port="8005" shutdown="SHUTDOWN" debug="0">
  <Listener
className="org.apache.catalina.mbeans.ServerLifecycleListener"
            debug="0"/>
  <Listener
className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
            debug="0"/>
 
  <!-- Global JNDI resources -->
  <GlobalNamingResources>
 
    <!-- Test entry for demonstration purposes -->
    <Environment name="simpleValue" type="java.lang.Integer"
value="30"/>
 
    <!-- Editable user database that can also be used by
         UserDatabaseRealm to authenticate users -->
    <Resource name="UserDatabase" auth="Container"
              type="org.apache.catalina.UserDatabase"
       description="User database that can be updated and saved">
    </Resource>
    <ResourceParams name="UserDatabase">
      <parameter>
        <name>factory</name>
 
<value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
      </parameter>
      <parameter>
        <name>pathname</name>
        <value>conf/tomcat-users.xml</value>
      </parameter>
    </ResourceParams>
 
  </GlobalNamingResources>
 
 
  <!-- Define the Tomcat Stand-Alone Service -->
  <Service name="Catalina">
 
 
    <!-- Define a non-SSL Coyote HTTP/1.1 Connector on port 8080 -->
    <Connector port="8080"
               maxThreads="150" minSpareThreads="25"
maxSpareThreads="75"
               enableLookups="false" redirectPort="8443"
acceptCount="100"
               debug="0" connectionTimeout="20000"
               disableUploadTimeout="true" />
    <!-- Note : To disable connection timeouts, set connectionTimeout
value
     to 0 -->
 
    <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
    <Connector port="8009"
               enableLookups="false" redirectPort="8443" debug="0"
               protocol="AJP/1.3" />
 
    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Catalina" defaultHost="localhost" debug="0">
 
 
      <!-- Global logger unless overridden at lower levels -->
      <Logger className="org.apache.catalina.logger.FileLogger"
              prefix="catalina_log." suffix=".txt"
              timestamp="true"/>
 
      <!-- Because this Realm is here, an instance will be shared
globally -->
 
      <Realm className="org.apache.catalina.realm.UserDatabaseRealm"
                 debug="0" resourceName="UserDatabase"/>
 
 
      <!--  default virtual host -->
        <Host name="localhost" debug="0" appBase="webapps"
       unpackWARs="true" autoDeploy="true"
       xmlValidation="false" xmlNamespaceAware="false">
         <Context path=""
docBase="/usr/local/jakarta-tomcat-5.0.25/webapps/ROOT/" debug="0"
reloadable="true" crossContext="true"/>
        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="localhost_log." suffix=".txt"
            timestamp="true"/>
      </Host>
 
      <!-- dev.mra.co.id -->
        <Host name="dev.mra.co.id" debug="0"
                appBase="/usr/local/www/data/"
                unpackWARs="true">
        <Context path="" docBase="" debug="1"/>
        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="dev_log." suffix=".txt"
            timestamp="true"/>
        </Host>
 
      <!-- java.mra.co.id -->
        <Host name="java.mra.co.id" debug="0"
                appBase="/usr/local/www/data/java.mra.co.id"
                unpackWARs="true">
        <Context path="" docBase="/usr/local/www/data/java.mra.co.id"
debug="1"/>
        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="java_log." suffix=".txt"
            timestamp="true"/>
        </Host>
 
  </Engine>
 
  </Service>
 
</Server>
ns2#