tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "C. Kukulies" <k...@www.kukulies.org>
Subject cannot get servlet mapping working under 3.3
Date Sun, 04 Apr 2004 19:55:25 GMT
I'm reconvalescing from a disc crash where lots of my existing
tomcat 3.1/apache 1.3.26 installation had crashed and I 
reinstalled tomcat 3.3 with apache-1.3.27 now such that 
the examples work when I connect to the server at port 8080.
But this is tomcat. Trying to connect to apache via the jserv
modules doesn't seem to work.

logs/stderr.log looks ok. 

I have included apache/jserv/jserv.conf  at the end of httpd.conf


jserv.conf:
###############################################################################

###############################################################################

# Note: this file should be appended or included into your httpd.conf

# Tell Apache on win32 to load the Apache JServ communication module
#LoadModule jserv_module modules/ApacheModuleJServ.dll

# Tell Apache on Unix to load the Apache JServ communication module
# For shared object builds only!!!
LoadModule jserv_module /usr/local/libexec/apache/mod_jserv.so

<IfModule mod_jserv.c>

# Whether Apache must start Apache JServ or not (On=Manual Off=Autostart)
# Syntax: ApJServManual [on/off]
# Default: "Off"
ApJServManual Off

# Properties filename for Apache JServ in Automatic Mode. 
# In manual mode this directive is ignored
# Syntax: ApJServProperties [filename]
# Default: "./conf/jserv.properties"
ApJServProperties /usr/local/etc/apache/jserv/jserv.properties

# Log file for this module operation relative to Apache root directory.
# Set the name of the trace/log file.  To avoid possible confusion about
# the location of this file, an absolute pathname is recommended.
# 
# This log file is different than the log file that is in the
# jserv.properties file. This is the log file for the C portion of Apache
# JServ.
# 
# On Unix, this file must have write permissions by the owner of the JVM
# process. In other words, if you are running Apache JServ in manual mode
# and Apache is running as user nobody, then the file must have its
# permissions set so that that user can write to it.
# Syntax: ApJServLogFile [filename] 
# Default: "./logs/mod_jserv.log"
# Note: when set to "DISABLED", the log will be redirected to Apache error log
ApJServLogFile /var/log/mod_jserv.log

# Log Level for this module
# Syntax: ApJServLogLevel [debug|info|notice|warn|error|crit|alert|emerg]
# Default: info    (unless compiled w/ JSERV_DEBUG, in which case it's debug)
ApJServLogLevel debug

# Protocol used by this host to connect to Apache JServ
# (see documentation for more details on available protocols)
# Syntax: ApJServDefaultProtocol [name]
# Default: "ajpv12"
ApJServDefaultProtocol ajpv12

# Default host on which Apache JServ is running
# Syntax: ApJServDefaultHost [hostname]
# Default: "localhost"
#ApJServDefaultHost java.apache.org

# Default port that Apache JServ is listening to
# Syntax: ApJServDefaultPort [number]
# Default: protocol-dependant (for ajpv12 protocol this is "8007")
ApJServDefaultPort 8007

# The amount of time to give to the JVM to start up as well
# as the amount of time to wait to ping the JVM to see if it
# is alive. Slow or heavily loaded machines might want to 
# increase this value.
# Default: 10 seconds
# ApJServVMTimeout 10

# Passes parameter and value to specified protocol.
# Syntax: ApJServProtocolParameter [name] [parameter] [value]
# Default: NONE
# Note: Currently no protocols handle this. Introduced for future protocols.

# Apache JServ secret key file relative to Apache root directory.
# Syntax: ApJServSecretKey [filename]
# Default: "./conf/jserv.secret.key"
# Warning: if authentication is DISABLED, everyone on this machine (not just
# this module) may connect to your servlet engine and execute servlet 
# bypassing web server restrictions. See the documentation for more information
#ApJServSecretKey /usr/local/etc/apache/jserv/jserv.secret.key
ApJServSecretKey DISABLED

# Mount point for Servlet zones
# (see documentation for more information on servlet zones)
# Syntax: ApJServMount [name] [jserv-url]
# Default: NONE
# Note: [name] is the name of the Apache URI path to mount jserv-url on
#       [jserv-url] is something like "protocol://host:port/zone"
#  If protocol, host or port are not specified, the values from 
#  "ApJServDefaultProtocol", "ApJServDefaultHost" or "ApJServDefaultPort" 
#  will be used. 
#  If zone is not specified, the zone name will be the first subdirectory of
#  the called servlet.
# Example: "ApJServMount /servlets /myServlets"
#  if user requests "http://host/servlets/TestServlet"
#  the servlet "TestServlet" in zone "myServlets" on default host
#  thru default protocol on defaul port will be requested
# Example: "ApJServMount /servlets ajpv12://localhost:8007"
#  if user requests "http://host/servlets/myServlets/TestServlet"
#  the servlet "TestServlet" in zone "myServlets" will be requested
# Example: "ApJServMount /servlets ajpv12://jserv.mydomain.com:15643/myServlets"
#  if user requests "http://host/servlets/TestServlet" the servlet 
#  "TestServlet" in zone "myServlets" on host "jserv.mydomain.com" using 
#  "ajpv12" protocol on port "15643" will be executed
#ApJServMount /servlets /root
#ApJServMount /servlet /root
#+++
# CPK
Alias /servlets /usr/local/jakarta-tomcat3.3/webapps/servlets
<Directory "/usr/local/jakarta-tomcat3.3/webapps/servlets">
    Options Indexes FollowSymLinks
</Directory>
ApJServMount /servlets/servlet /servlets
<Location /servlets/WEB-INF/ >
    AllowOverride None
    deny from all
</Location>

ApJServMount /servlet /ROOT


# CPK
#---
#

# Whether <VirtualHost> inherits base host mount points or not
# Syntax: ApJServMountCopy [on/off]
# Default: "On"
# Note: This directive is meaninful only when virtual hosts are being used
ApJServMountCopy on

# Executes a servlet passing filename with proper extension in PATH_TRANSLATED 
# property of servlet request.
# Syntax: ApJServAction [extension] [servlet-uri]
# Defaults: NONE
# Notes: This is used for external tools.
#ApJServAction .jsp /servlets/org.gjt.jsp.JSPServlet
#ApJServAction .gsp /servlets/com.bitmechanic.gsp.GspServlet
#ApJServAction .jhtml /servlets/org.apache.servlet.ssi.SSI
#ApJServAction .xml /servlets/org.apache.cocoon.Cocoon

# Enable the Apache JServ status handler with the URL of 
# "http://servername/jserv/" (note the trailing slash!)
# Change the "deny" directive to restrict access to this status page.
<Location /jserv/>
  SetHandler jserv-status
  
  order deny,allow
  deny from all
  allow from 127.0.0.1
</Location>



############################## W A R N I N G ##################################
# Remember to disable or otherwise protect the execution of the Apache JServ  #
# Status Handler (see right above) on a production environment since this may #
# give untrusted users the ability to obtain restricted information on your   #
# servlets and their initialization arguments such as JDBC passwords and      #
# other important information. The Apache JServ Status Handler should be      #
# accessible only by system administrators.                                   #
###############################################################################

</IfModule>

server.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<Server>

    <!-- You can add a "home" attribute to represent the "base" for 
         all relative paths. If none is set, the TOMCAT_HOME property
         will be used, and if not set "." will be used.
         webapps/, work/ and log/ will be relative to this ( unless 
         set explicitely to absolute paths ).
      -->
    <ContextManager workDir="work" >

      <!-- ==================== Global modules ==================== -->
        <LoaderInterceptor11  useApplicationLoader="true" />

        <TrustedLoader />

        <LogSetter name="tc_log" timestamps="true"
		   verbosityLevel="INFORMATION"  />

        <LogEvents enabled="false" />
        
        <!-- Backward compat: read the Context declarations from server.xml-->
        <ContextXmlReader config="conf/server.xml" />

        <!-- Separated Context -->
        <ContextXmlReader config="conf/apps.xml" />

        <AutoDeploy source="modules" target="modules" 
		    redeploy="true" />

        <AutoWebApp dir="modules" host="DEFAULT" trusted="true"/>

        <AutoDeploy source="webapps" target="webapps" />

        <AutoWebApp dir="webapps" host="DEFAULT" />

        <PolicyLoader securityManagerClass="java.lang.SecurityManager"
		      policyFile="conf/tomcat.policy" />

        <SimpleMapper1 />

        <SessionExpirer checkInterval="60" />
        <!-- For development you can use randomClass="java.util.Random" -->
        <SessionIdGenerator randomClass="java.security.SecureRandom" 
                            randomFile="/dev/urandom" />


        <!-- ========== context processing modules ========== -->

        <!-- This will be the "default" profile 
             ( all except the "global" modules can be set per context )
          -->
        <LogSetter name="servlet_log" 
		   timestamps="true"
		   verbosityLevel = "INFORMATION"
		   path="logs/servlet-${yyyyMMdd}.log" 
		   />

        <LogSetter  name="JASPER_LOG"
		   timestamps="true" 
		   path="logs/jasper-${yyyyMMdd}.log" 
		   verbosityLevel = "INFORMATION"  />

        <WebXmlReader validate="true" />

        <ErrorHandler showDebugInfo="true" />

        <WorkDirSetup cleanWorkDir="false" />

        <Jdk12Interceptor /> 

        <!-- Non-standard invoker, for backward compat. ( /servlet/* ) -->
        <InvokerInterceptor /> 

        <!-- you can add javaCompiler="jikes" -->
        <JspInterceptor keepGenerated="true"
			largeFile="false"
			useJspServlet="false"
			/>
        
        <StaticInterceptor listings="true"
                           useAcceptLanguage="true"
                           useCharset="locale" />
        
        <ReloadInterceptor fullReload="true" />

        <SimpleSessionStore maxActiveSessions="-1" />

        <AccessInterceptor />

        <CredentialsInterceptor />

        <SimpleRealm  filename="conf/users/global-users.xml" />

       <!-- UnComment the following and comment out the
            above to get a JDBC realm.
            Other options for driverName: 
              driverName="oracle.jdbc.driver.OracleDriver"
              connectionURL="jdbc:oracle:thin:@ntserver:1521:ORCL"
              connectionName="scott"
              connectionPassword="tiger"

              driverName="org.gjt.mm.mysql.Driver"
              connectionURL="jdbc:mysql://localhost/authority"
              connectionName="test"
              connectionPassword="test"

            "connectionName" and "connectionPassword" are optional.
        -->
        <!--
        <JDBCRealm
            debug="99" 
	    driverName="sun.jdbc.odbc.JdbcOdbcDriver" 
	    connectionURL="jdbc:odbc:TOMCAT" 
	    userTable="users" 
            userNameCol="user_name" 
            userCredCol="user_pass" 
	    userRoleTable="user_roles" 
            roleNameCol="role_name" />
        -->

        <LoadOnStartupInterceptor />

        <Servlet22Interceptor />


        <!-- Tag pooling support.
             To enable the reuse of tag handlers as described in
             the JSP spec, uncomment the following.  If your pages
             use a lot of custom tags, you should see a nice performance
             gain.
             
             Note that placing the interceptor here will enable
             Tag pooling for all of the web applicatitions loaded -
             this may be a bad thing if all tags are not coded to
             handle reuse. To enable pooling only for specific web
             applications i.e. Contexts, place the interceptor inside of 
             the Context's definition.
             
             To view information about tag usage uncomment the tag
             LogSetter. Set verbosityLevel to DEBUG to see everytime
             a tag is obtained and released.
        -->
        <!--
        <LogSetter  name="tag_pool_log" timestamps="true" 
            path="logs/tagpool-${yyyyMMdd}.log" 
            verbosityLevel="INFORMATION" />

        <TagPoolManagerInterceptor />
        -->

        <!-- Request processing -->

        <DecodeInterceptor /> 

        <!-- If you are running SSL and wish to verify Tomcat sessions 
             against SSL sessions, use checkSSLSessionId="true"
             Default is checkSSLSessionId="false" -->
        <SessionId cookiesFirst="true" noCookies="false" /> 

        <!-- Automatic config generation
             Set noRoot="false" if you wish to have Tomcat try to take
               control of the external web server's root context.
               Additonal configuration of the external web server may be
               required for this to be successful.
             Note: Configuration files are not written as part of the
               default startup behvior.  Append "jkconf" to the startup
               command to have Tomcat initialize, write the config files,
               then exit. This may be done while Tomcat is running.
          -->
        <ApacheConfig noRoot="true" />
        <IISConfig noRoot="true" />
        <NSConfig noRoot="true" />

         <!-- Uncoment for apache-style logs 
              Attributes: logFile, flush, format
        <AccessLogInterceptor/>
          -->
      <!-- ==================== Connectors ==================== -->

       <!-- new http adapter. Attributes:
               secure - use SSL ( https )
               keystore, keypass - certs for SSL
               port 
               reportedname - Server name to send back to browser
                              by default report Tomcat Web Server ...
                              set an empty string to avoid sending server header 
        -->
        <Http10Connector   port="8080" 
			   secure="false"
			   maxThreads="100"
			   maxSpareThreads="50"
			   minSpareThreads="10" />

        <!--
            Uncomment this for SSL support. You _need_ to set up a
            server certificate if you want this to work, and you
            need JSSE. See tomcat-ssl-howto.html for more detailed
            instructions.

            1. Make the JSSE jars available to Tomcat, either by making
               them an installed extension or by adding them to the
               Tomcat CLASSPATH.
            2. Do: keytool -genkey -alias tomcat -keyalg RSA
               RSA is essential to work with Netscape and IIS.
               Use "changeit" as password. ( or add keypass attribute )
               You don't need to sign the certificate.
         -->
        <!--
        <Http10Connector  port="8443" secure="true" />
        -->

        <!--
             JNI connector. It assumes the library is located in 
             TOMCAT_HOME/bin/native/jni_connect.[dll, nlm, so]. or in LD_LIBRARY_PATH.
             For different paths set "nativeLibrary" parameter.

             The JniConnector will be self-enable only if JNI mode is detected.
         -->
        <JniConnector /> 

        <!-- Apache AJP12 support. This is also used to shut down tomcat.
             Parameter "address" defines network interface this Interceptor
             "binds" to. Add it if you want to "bind" to just "127.0.0.1".
             
             address="127.0.0.1"
             
             Parameter "tomcatAuthentication", controls if Tomcat honors 
             ( and uses ) auth done in HTTP Server or not, when true Tomcat does 
             not use in any way auth information provided by the HTTP Server. 
             true is the default. 
             
             tomcatAuthentication="false"
             
          -->
        <Ajp12Connector	 port="8007" />

        <!-- Apache AJP13 support (mod_jk)
             Parameter "address" defines network interface this Interceptor
             "binds" to. Add it if you want to "bind" to just "127.0.0.1".

             address="127.0.0.1"

             Parameter "tomcatAuthentication", controls if Tomcat honors 
             ( and uses ) auth done in HTTP Server or not, when true Tomcat does 
             not use in any way auth information provided by the HTTP Server. 
             true is the default. 
             
             tomcatAuthentication="false"
             

          -->
        <Ajp13Connector port="8009" />

      <!-- 
           Context definitions can be placed here ( not recommended ) or 
           in separate files. The ContextXmlReader will read all context
           definitions ( you can customize the "base" filename ). 
 
           The default is conf/apps-[name].xml.
 
           See conf/apps-examples.xml and conf/apps-admin.xml  
       -->
 <!-- example - how to override AutoSetup actions -->
        <Context path="/examples" docBase="webapps/examples" debug="0"
reloadable="true" >
        </Context>


        <!-- example - how to override AutoSetup actions -->
        <Context path="/servlets" docBase="webapps/servlets" debug="0" reloadable="true"
>
        </Context>
        <Context path="" docBase="/usr/local/www/data" >
        </Context>

    </ContextManager>
</Server>

Is tomcat.conf part of the game? I'd think not since it is not included in
httpd.conf.


Thanks for helping.

--
Chris Christoph P. U. Kukulies kuku_at_physik.rwth-aachen.de



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message