Yes, well this is where things get a little messy.  I am using a version of
Tomcat installed by a search engine software package called Endeca.  They
HAVE made some default settings of their own in server.xml.  I have not been
using ${CATALINA_HOME} in the server.xml config file; I have been manually
entering the directory.
I will paste in my server.xml here:
---------------------------------------
<Server port="8090" shutdown="SHUTDOWN" debug="0">

  <!-- Define the Tomcat Stand-Alone Service -->
  <Service name="Tomcat-Standalone">

   <!-- NOTE: ENDECA HAS MODIFIED THE DEFAULT TOMCAT NON-SSL HTTP PORT OF
8080.
        ENDECA' USES A DEFAULT NON-SSL HTTP PORT OF 8888. This is the port
that
        Tomcat serves pages on.
    -->

    <!-- Define a non-SSL HTTP/1.1 Connector on port 8888 -->
    <Connector className="org.apache.catalina.connector.http.HttpConnector"
               port="8888" minProcessors="5" maxProcessors="75"
               enableLookups="true" redirectPort="8443"
               acceptCount="10" debug="0" connectionTimeout="60000"/>
    <!-- Note : To disable connection timeouts, set connectionTimeout value 
     to -1 -->

    <!-- An Engine represents the entry point (within Catalina) that
processes
         every request.  The Engine implementation for Tomcat stand alone
         analyzes the HTTP headers included with the request, and passes them
         on to the appropriate Host (virtual host). -->

    <!-- Define the top level container in our container hierarchy -->
    <Engine name="Standalone" 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.MemoryRealm" />

      <!-- Replace the above Realm with one of the following to get a Realm
           stored in a database and accessed via JDBC -->

      <!-- Define the default virtual host -->
      <Host name="localhost" debug="0" appBase="webapps" 
       unpackWARs="true" autoDeploy="true">

        <!-- Access log processes all requests for this virtual host.  By
             default, log files are created in the "logs" directory relative
to
             $CATALINA_HOME.  If you wish, you can specify a different
             directory with the "directory" attribute.  Specify either a
relative
             (to $CATALINA_HOME) or absolute path to the desired directory.
        -->
        <Valve className="org.apache.catalina.valves.AccessLogValve"
                 directory="logs"  prefix="localhost_access_log."
suffix=".txt"
                 pattern="common"/>

        <!-- Logger shared by all Contexts related to this virtual host.  By
             default (when using FileLogger), log files are created in the
"logs"
             directory relative to $CATALINA_HOME.  If you wish, you can
specify
             a different directory with the "directory" attribute.  Specify
either a
             relative (to $CATALINA_HOME) or absolute path to the desired
             directory.-->
        <Logger className="org.apache.catalina.logger.FileLogger"
                 directory="logs"  prefix="localhost_log." suffix=".txt"
                timestamp="true"/>

                <Context path="myapp"
docBase="/station/endeca/4.5.4/i86pc-linux/webapps/myapp"
                                debug="0" privileged="false">
                </Context>

        <!-- Context configuration file for the Endeca Web Studio Help -->
                <Context path="/WebStudioHelp"
docBase="/station/endeca/4.5.4/i86pc-linux/tools/server/webapps/WebStudioHelp
"
                                debug="0" privileged="false">
                </Context>

        <!-- Context configuration file for the Endeca JSP Reference UI -->
                <Context path="/jspref"
docBase="/station/endeca/4.5.4/i86pc-linux/tools/server/webapps/endeca_jspref
"
                                debug="0" privileged="false">
                </Context>

                 <Context path="/search" docBase="/station/endeca/search"
                                debug="0" privileged="false">
                </Context>

                 <Context path="/library" docBase="/station/endeca/library"
                                debug="0" privileged="false">
                </Context>

                <Context path="/IT" docBase="/station/endeca/IT"
                                debug="0" privileged="false">
                </Context>

                <Context path="/cgi-bin" docBase="/station/endeca/cgi-bin"
                                debug="0" privileged="false">
                </Context>

      </Host>

    </Engine>

  </Service>

</Server> 
---------------------------------------

Thanks a lot.
--Alex


Alex Brelsfoard
Web Applications Developer
Web Development Office
Worcester Polytechnic Institute
508-831-6147
[EMAIL PROTECTED]

-----Original Message-----
From: Mark Thomas [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 08, 2005 5:19 PM
To: Tomcat Users List
Subject: Re: Trouble getting CGI script to execute

Before I forget, what version of Tomcat?

I don't think you can use ${CATALINA_HOME} directly in server.xml (I might be
wrong).

Can you post your server.xml? It looks like you have made some changes that
might be complicating matters.

*If* you host still has auto deploy configured (it is unless you explicitly
set it to false) and an appbase of "webapps", remove the <Context> element
for myapp completely. Auto deploy will sort it out.

Mark

Brelsfoard, Alex wrote:
> OK I changed it so that the path is "myapp" and the docBase is 
> "${CATALINA_HOME}/webapps/myapp".
> Restarted Tomcat
> Still nothing.
> --Alex
> 
> 
> Alex Brelsfoard
> Web Applications Developer
> Web Development Office
> Worcester Polytechnic Institute
> 508-831-6147
> [EMAIL PROTECTED]
> 
> -----Original Message-----
> From: Mark Thomas [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, February 08, 2005 4:48 PM
> To: Tomcat Users List
> Subject: Re: Trouble getting CGI script to execute
> 
> Brelsfoard, Alex wrote:
> 
>>Ok.  So I did everything you said.  Still not working.
>>I get a 404 error.
>>So I took it step by step to see if I made typos or something.  If I 
>>go to http://host:port I see the directory listing including "myapp"
> 
> 
> This shouldn't happen. This means that myapp is a directory in the 
> root context rather than a separate context.
> 
> Have you edited server.xml at all? It looks like you have a context 
> element along the lines of <Context path=""
docBase="${CATALINA_HOME}/webapps"
> debug="0"/> in your server.xml. This is bad. The default install uses 
> <Context path="" docBase="ROOT" debug="0"/> although it is commented 
> out because tomcat does this automatically by default anyway.
> 
> Mark
> 
> 
>>I click on
>>myapp.  There is nothing in the directory listing.  I then add 
>>"/cgi-bin/script.cgi" to the end, to make 
>>http://host:port/myapp/cgi-bin/script.cgi.  Same result: 404.
>>I then tried http://host:port/myapp/script.cgi.  Same result.
>>I then tried http://host:port/myapp/WEB-INF/cgi/script.cgi.  This time 
>>it asked me if I want to open or download this file.
>><shrug>
>>Any ideas?
>>Thanks.
>>--Alex
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to