tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <prho...@vdsinc.com>
Subject Problem deploying web application in directory other than $CATALINA_HOME/webapps
Date Thu, 16 May 2002 15:30:14 GMT

Hello all, I'm having some trouble getting Tomcat configured, and was
hoping somebody could help me out a little.

Here is what I have..  Tomcat + Apache + mod_webapp, running on SuSE
Linux...  The Tomcat is 4.x and my Apache is 1.3.14.

I have a directory /www/cps set up to hold my static HTML files.  What I
would *like* to do, if possible, is put my jsp files
in that same directory, or a subdir under it.

What I have done so far is this:

edited my httpd.conf, to load mod_webapp, and created a virtual host which
represents my application. Inside
of that virtual host are my WebAppXXXXX directives.  Those last two
WebAppDeploy directives are just kinda
"experimental" where I was playing around with things, trying to figure
this out.  The first one represents what
I really want, which is an application deployed as
www.countypaymentservices.com/payment/ which will
support JSP's.  I think this part is basically right, because the
webapp-info app works fine, and all the
error message I get are Tomcat messages, not Apache messages...

******** snippet *******

<VirtualHost 10.0.0.96>
    ServerAdmin prhodes@vdsinc.com
    DocumentRoot /www/cps
    DirectoryIndex index.php
    ServerName www.countypaymentservices.com
    Port 80
    ErrorLog /www/cps/logs/countypaymentservices.com-error_log
    CustomLog /www/cps/logs/www.countypaymentservices.com-access_log common

    WebAppConnection conn warp www.countypaymentservices.com:8008
    WebAppDeploy payment conn /payment/
    WebAppDeploy examples conn /examples/
    WebAppDeploy numguess conn /numguess/
    WebAppInfo /webapp-info
</VirtualHost>

****** end snippet ******

Next, in my server.xml file, I setup the Tomcat-Apache service as follows:

******* snippet *******

<!-- Define an Apache-Connector Service -->
  <Service name="Tomcat-Apache">

    <Connector className="org.apache.catalina.connector.warp.WarpConnector"
     port="8008" minProcessors="5" maxProcessors="75"
     enableLookups="true"
     acceptCount="10" debug="0"/>

    <!-- Replace "localhost" with what your Apache "ServerName" is set to
-->
    <Engine className="org.apache.catalina.connector.warp.WarpEngine"
     name="Apache" defaultHost="www.countypaymentservices.com" debug="0"
appBase="/www/cps/">

      <!-- Global logger unless overridden at lower levels -->
      <Logger className="org.apache.catalina.logger.FileLogger"
              prefix="apache_log." suffix=".txt"
              timestamp="true"/>

      <!-- Because this Realm is here, an instance will be shared globally
-->
      <Realm className="org.apache.catalina.realm.MemoryRealm" />

      <!-- Define the default virtual host -->
      <Host name="www.countypaymentservices.com" debug="0" appBase
="/www/cps/" unpackWARs="false">

      </Host>
    </Engine>

  </Service>


******** end snippet ******

As I understand things, this should make /www/cps the "root" for my
webapps.  So, underneath /www/cps, I created
a directory called payment, created a WEB-INF directory underneath that,
and put web.xml inside of WEB-INF.  Inside the
/www/cps/payment folder, I put my .jsp file.

I have similar setups for examples and numguess as well, also under
/www/cps.

With this configuration, the webapp-info app reports the following:

****** snippet *****

Host www.countypaymentservices.com:80
Application Name
Root URL Path
Local Deployment Path
Configuration Details
Connection
Deployed "_INFO_"
"/webapp-info/"
No local deployment path
No configuration iformation
"_INFO_" (details)
TRUE
Application Name
Root URL Path
Local Deployment Path
Configuration Details
Connection
Deployed "numguess"
"/numguess/"
"/www/cps/numguess"
"Application ID: 0"
"conn" (details)
TRUE
Application Name
Root URL Path
Local Deployment Path
Configuration Details
Connection
Deployed "examples"
"/examples/"
"/www/cps/examples"
"Application ID: 1"
"conn" (details)
TRUE
Application Name
Root URL Path
Local Deployment Path
Configuration Details
Connection
Deployed "payment"
"/payment/"
"/www/cps/payment"
"Application ID: 2"
"conn" (details)
TRUE

Connections
Connection Name
Connection Parameters
Provider
Configuration Details "_INFO_"
""
"info"
No configuration iformation
Connection Name
Connection Parameters
Provider
Configuration Details "conn"
"www.countypaymentservices.com:8008"
"warp"
"Host: www.countypaymentservices.com Port:8008 Address:10.0.0.96
(Connected) Server ID: -1761011707"

**** end snippet ****


Now, the problem...  none of my webapps work correctly.  If I try entering
a url of www.countrypaymentservices.com/payment/

I get an error like "HTTP Status 404 - /numguess/
The requested resource (/numguess/) is not available."

Yep, that's right... I tried to request payment, and it tries to send me
numguess.. wtf???  Even weirder, if I keep hitting refresh
in my browser, it eventually serves up a directory listing of the
/www/cps/payment directory.  If I click on the payment.jsp
file that resides there, however, nothing happens.

So, can anybody help me figure out what I'm doing wrong here?  If so, I'd
be VERY appreciative.

Thanks,

Phillip Rhodes
Application Designer
Voice Data Solutions
919-571-4300 x225
prhodes@vdsinc.com


The history of liberty is a history of resistance. The history of liberty
is a history of limitations of governmental power, not the increase of it.
- Woodrow Wilson Speech in New York, September 9, 1912

Those who are willing to sacrifice essential liberties for a little order,
will lose both and deserve neither. - Benjamin Franklin



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


Mime
View raw message