You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Radiks e-Mail <ji...@radiks.net> on 2001/10/17 07:04:03 UTC
Warp and Webapp
This may have been answered, but I haven't seen it anywhere.
Using Tomcat 4.0.1, I edited the server.xml file to define a new context =
using a directory outside of the normal webapps directory. It works =
fine over :8080/context. I edit the http.conf file to include the =
mod_webapp directives and this is a problem. I get an endless loop of =
errors in the apache/logs/error_log stating the webapp can't be =
deployed. When I look at the WarpConnector logs, it tells me it's =
looking in webapps for my context. I think it should use what's in the =
server.xml file - mod_jk does.
Am I all wet here?
Jim
Re: Warp and Webapp
Posted by Pier Fumagalli <pi...@betaversion.org>.
Yes please... Configuration and log files :)
Pier
Chad Johnson at chadj@netnet.net wrote:
> Hey,
> I get these exact same problems when attempting to deploy out of
> $CATALINA_HOME/webapps . So this isn't an isolated event. I can supply
> more info if needed.
>
> -Chad
>
> ----- Original Message -----
> From: "Pier Fumagalli" <pi...@betaversion.org>
> To: <to...@jakarta.apache.org>
> Sent: Wednesday, October 17, 2001 9:59 AM
> Subject: Re: Warp and Webapp
>
>
>> Radiks e-Mail at jimc@radiks.net wrote:
>>
>>> This may have been answered, but I haven't seen it anywhere.
>>>
>>> Using Tomcat 4.0.1, I edited the server.xml file to define a new context
> =
>>> using a directory outside of the normal webapps directory. It works =
>>> fine over :8080/context. I edit the http.conf file to include the =
>>> mod_webapp directives and this is a problem. I get an endless loop of =
>>> errors in the apache/logs/error_log stating the webapp can't be =
>>> deployed. When I look at the WarpConnector logs, it tells me it's =
>>> looking in webapps for my context. I think it should use what's in the
> =
>>> server.xml file - mod_jk does.
>>>
>>> Am I all wet here?
>>
>> Can you send me a copy of your apache error log and catalina log? Thanks!
>>
>> Pier
>>
>
>
>
Re: Warp and Webapp
Posted by Jim Chrystal <jc...@r5i.com>.
Try this:
In your server.xml file between your <Engine></Engine> tags:
<Host name="<!-- your virtual host name -->" debug="0"
appbase="webapps">
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs"
prefix="webapp_<!-- your context name -->_log"
suffix=".txt" />
<Context path="/<!-- your context name -->"
docBase="<!-- path to your webapp -->"
debug="0"
reloadable="true" />
</Host>
And, in your httpd.conf file in your virtual host declaration:
WebAppDeploy ="<!-- path to your webapp --> warpConnection /<!-- your
context name -->
No need to put the app in webapps or even declare it anywhere else in the
server.xml file outside the manner mentioned above.
JC
----- Original Message -----
From: "John Carnahan" <ca...@protos.lifesci.ucla.edu>
To: <to...@jakarta.apache.org>
Sent: Wednesday, October 17, 2001 11:26 AM
Subject: Re: Warp and Webapp
> All,
>
> I believe this is the same point I brought up last week and still have
> not received an answer. Pier, do you have any insight here? I believe
> that adding the WebAppAppBase directive is the most immediate and
> parsimonious solution. Would anyone else appreciate this change? Here is
> my question again:
>
> I am new to this list so I apologize if this has been addressed before.
> I saw several similar questions in the archives but no answers. I am
> using Tomcat 4.0 and Apache 1.3.X on RedHat Linux 7.1.
>
> First of all I would like to deploy an application using Apache/Tomcat
> (i.e. using the warp connector specifically). The problem is that I am
> not able to do so unless it resides in the tomcat webapps directory. The
>
> Tomcat standalone handles things just fine using a Host and Context.
> But, using Apache/WARP, there is little such flexibility in how to
> deploy apps. The WebAppDeploy directive takes only the application name
> and a URL pattern for the defined connection. Since it is assumed that
> the application name resides only within the CATALINA_HOME/webapps
> directory there is no way to deploy outside of this. There are several
> related issues and possible solutions here:
>
> 1. The Warp connector does not acknowledge the Host configuration in
> servers.xml. The Host configuration is the only place where it is
> possible to specify the 'appBase' in a different location than
> CATALINA_HOME/webapps. It makes sense that the Warp connector ignores
> the Host configuration since the hosts should actually be defined in the
>
> Apache config. But then, at least, there should be related Apache config
>
> directives that roughly correspond to Tomcat specific host information
> (e.g. WebAppAppBase). I am not sure if this is the right approach.
>
> 2. The WebAppDeploy directive takes an application name as a parameter.
> This does not necessarily have to be this way. It could be a path that
> is specified as an absolute path or a path relative to the
> CATALINA_HOME/webapps directory. I understand that the Servlet spec is
> somewhat limiting for the server.xml file. It would be nice if there was
>
> a better internal naming system such that a name described in the
> WebAppDeploy directive could map directly to a given name in the
> server.xml. An appropriate naming system would probably be the best
> solution but the spec does not really allow it.
>
> That said, does anyone have any advice as to how to set this up? I have
> things working with symlinks right now but that is obviously not a good
> solution. Is there something in the works right now that addresses the
> problem.
>
> Thanks,
> John Carnahan
>
>
>
> Janek Bogucki wrote:
>
> > There was a problem with the appBase attribute of
> > <Engine> in TC 4.0, see
> >
> > http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4134
> >
> > The bug is closed but still existed when I looked in
> > the source for TC via ViewCVS recently.
> >
> > Janek Bogucki
> >
> > --- Chad Johnson <ch...@netnet.net> wrote: > Hey,
> > > I get these exact same problems when attempting to
> > > deploy out of
> > > $CATALINA_HOME/webapps . So this isn't an isolated
> > > event. I can supply
> > > more info if needed.
> > >
> > > -Chad
> > >
> > > ----- Original Message -----
> > > From: "Pier Fumagalli" <pi...@betaversion.org>
> > > To: <to...@jakarta.apache.org>
> > > Sent: Wednesday, October 17, 2001 9:59 AM
> > > Subject: Re: Warp and Webapp
> > >
> > >
> > > > Radiks e-Mail at jimc@radiks.net wrote:
> > > >
> > > > > This may have been answered, but I haven't seen
> > > it anywhere.
> > > > >
> > > > > Using Tomcat 4.0.1, I edited the server.xml file
> > > to define a new context
> > > =
> > > > > using a directory outside of the normal webapps
> > > directory. It works =
> > > > > fine over :8080/context. I edit the http.conf
> > > file to include the =
> > > > > mod_webapp directives and this is a problem. I
> > > get an endless loop of =
> > > > > errors in the apache/logs/error_log stating the
> > > webapp can't be =
> > > > > deployed. When I look at the WarpConnector
> > > logs, it tells me it's =
> > > > > looking in webapps for my context. I think it
> > > should use what's in the
> > > =
> > > > > server.xml file - mod_jk does.
> > > > >
> > > > > Am I all wet here?
> > > >
> > > > Can you send me a copy of your apache error log
> > > and catalina log? Thanks!
> > > >
> > > > Pier
> > > >
> > >
> >
> > ____________________________________________________________
> > Nokia Game is on again.
> > Go to http://uk.yahoo.com/nokiagame/ and join the new
> > all media adventure before November 3rd.
>
Re: Warp and Webapp
Posted by Pier Fumagalli <pi...@betaversion.org>.
John Carnahan at carnahan@protos.lifesci.ucla.edu wrote:
>> I was actually thinking about "reversing" the problem... Instead of
>> configuring it from httpd.conf with "WebAppDeploy....", configuring all in
>> server.xml, and then using in httpd.conf something like "WebAppDeployAll
>> true", in this case, we can also solve the problem of using the Manager
>> application to deploy web applications "live"...
>
> This is a bad idea (as I describe further below). The problem with this is
> then you need to synchronize the host info in both httpd.conf and server.xml
> since WebAppDeployAll would have to be virtual-host-specific. It could lead to
> a nightmare in the config if each virtual host had to be defined in both
> places. The alternative to this synchronization is to have a more elaborate
> naming scheme for referencing into server.xml. Unfortunately the spec does not
> give us much latitude for this without using Host definitions.
Correct. But in cases when you want to specify something particular inside
your <Context> tag within server.xml, that's absolutely required. I don't
want to backport all Catalina configuration into the httpd.conf...
>> Actually, the application "name" can be used as a full path... For example:
>>
>> WebAppDeploy /myApplications/shoppingcart.war connection /shoppingcart
>
> Does it only recognize war files? If so I do not find that very useful. My
> point for doing all of this is setting up an appropriate multi-developer
> environment using Apache VirtualHosts. Using WAR files instead of simple
> directories is not very appealing for development.
Nope... It should also recognize directories... But Pier is a dork and
there's a bug in the path recognition algorithm (it doesn't look if a path
is absolute, it always considers it relative).
It'll be fixed in tomorrow's daily snapshot...
>> As I said, my previous example should work, and rather than adding more
>> configuration stuff in httpd.conf, I'd rather backport what is in server.xml
>> and make apache "see it" right...
>
> The problem with this, as I already mentioned, is that the virtual hosts
> should be defined in the apache config. The notion of an app-base belongs in
> the description of the virtual host but the tomcat-apache specfic config (WARP
> connector) in server.xml does not (and should not) have any notion of a host.
> The tomcat-standalone does have separate virtual hosts with their own
> corresponding app-base. The better way around this problem is to give tomcat a
> notion of the app-base from each separate virtual host in the apache
> httpd.conf. This way virtual hosts can each have their own base. Adding
> backports to server.xml would only replicate virtual hosts definitions in both
> httpd.conf and server.xml which could lead to synchronization problems. One
> way around this is to support full path info in each WebAppDeploy directive as
> you mentioned above. Another way is to define an app-base for that virtual
> host and then all of the Deploy directives could be relative to that. This way
> it would be more similar to the tomcat-standalone config in server.xml but
> without adding duplicate host definitions.
I completely agree with you on this topic, in fact, the very first
implementation of WARP didn't have ANY concept of Host on the Java side. If
you see it from the protocol, when a WARP request comes in, the request
already carries the ID of the application, and that is mapped to the context
instance. Look at the map() method in WarpHost (the one deciding which
context instance I need to use):
public Container map(Request request, boolean update) {
Context context=null;
this.log("Mapping request for Host");
if (request instanceof WarpRequest)
context=((WarpRequest)request).getContext();
else
context=(Context)super.map(request,update);
return(context);
}
Read it, and you'll see that the WarpRequest already KNOWS what context I
should use for my request... But there is a slight problem, the Manager
application. Without a concept of Host, the Manager application fails to
deploy applications (not that I give much crap about it, but someone might).
I would like to hear what Craig thinks about it...
The best solution would be to have something like:
server.xml
----------
<Server>
<Service name="Tomcat-Apache">
<Connector className="org.apache.catalina.connector.warp.WarpConnector"
port="8008" minProcessors="5" maxProcessors="75"
enableLookups="true"
acceptCount="10" debug="0"/>
<Engine className="org.apache.catalina.connector.warp.WarpEngine"
name="Apache" debug="0" appBase="webapps">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="apache_log." suffix=".txt"
timestamp="true"/>
<Context name="examples" path="/examples" docBase="examples"
className="org.apache.catalina.connector.warp.WarpContext">
.... All your context stuff...
</Context>
</Engine>
</Service>
</Server>
httpd.conf
----------
...
<VirtualHost a.host>
...
WebAppUse examples connection
WebAppDeploy examples connection /examples2/
</VirtualHost>
<VirtualHost b.host>
...
WebAppUse examples connection
WebAppDeploy examples connection /examples2/
</VirtualHost>
What's the difference out here? Is that basically the WarpEngine doesn't
have any concept of host (which resides at the WebServer level), but is just
a collection of Context instances...
Let's see how that configuration WOULD behave:
http://a.host:80/examples
Gets redirected to the instance of the "examples" application deployed in
server.xml, so, no fuzz, that's what I get
http://a.host:80/examples2
A new instance of the same web-application (examples) is deployed for
another context path: sessions created in a.host:80/examples are NOT VALID
in a.host:80/examples2
http://b.host:80/examples
Gets redirected to the SAME INSTANCE we're using for a.host:80/examples,
so sessions created there are valid also here (note that WebAppUse doesn't
allow you to specify a path since the servlet specification forbids you to
deploy the same context instance on two different paths)
http://b.host:80/examples2
This deploys a third instance of the same web application, but visible
only from this url...
Reversing the look:
Context #1 can be accessed from:
http://a.host:80/examples
http://b.host:80/examples
Context #2 can be accessed from:
http://a.host:80/examples2
Context #3 can be accessed from:
http://a.host:80/examples2
That was my original idea.. I would like to see what others think about it
(BTW, John, it's better to move this discussion over on tomcat-dev)...
Pier
Re: Warp and Webapp
Posted by Pier Fumagalli <pi...@betaversion.org>.
John Carnahan at carnahan@protos.lifesci.ucla.edu wrote:
>> I was actually thinking about "reversing" the problem... Instead of
>> configuring it from httpd.conf with "WebAppDeploy....", configuring all in
>> server.xml, and then using in httpd.conf something like "WebAppDeployAll
>> true", in this case, we can also solve the problem of using the Manager
>> application to deploy web applications "live"...
>
> This is a bad idea (as I describe further below). The problem with this is
> then you need to synchronize the host info in both httpd.conf and server.xml
> since WebAppDeployAll would have to be virtual-host-specific. It could lead to
> a nightmare in the config if each virtual host had to be defined in both
> places. The alternative to this synchronization is to have a more elaborate
> naming scheme for referencing into server.xml. Unfortunately the spec does not
> give us much latitude for this without using Host definitions.
Correct. But in cases when you want to specify something particular inside
your <Context> tag within server.xml, that's absolutely required. I don't
want to backport all Catalina configuration into the httpd.conf...
>> Actually, the application "name" can be used as a full path... For example:
>>
>> WebAppDeploy /myApplications/shoppingcart.war connection /shoppingcart
>
> Does it only recognize war files? If so I do not find that very useful. My
> point for doing all of this is setting up an appropriate multi-developer
> environment using Apache VirtualHosts. Using WAR files instead of simple
> directories is not very appealing for development.
Nope... It should also recognize directories... But Pier is a dork and
there's a bug in the path recognition algorithm (it doesn't look if a path
is absolute, it always considers it relative).
It'll be fixed in tomorrow's daily snapshot...
>> As I said, my previous example should work, and rather than adding more
>> configuration stuff in httpd.conf, I'd rather backport what is in server.xml
>> and make apache "see it" right...
>
> The problem with this, as I already mentioned, is that the virtual hosts
> should be defined in the apache config. The notion of an app-base belongs in
> the description of the virtual host but the tomcat-apache specfic config (WARP
> connector) in server.xml does not (and should not) have any notion of a host.
> The tomcat-standalone does have separate virtual hosts with their own
> corresponding app-base. The better way around this problem is to give tomcat a
> notion of the app-base from each separate virtual host in the apache
> httpd.conf. This way virtual hosts can each have their own base. Adding
> backports to server.xml would only replicate virtual hosts definitions in both
> httpd.conf and server.xml which could lead to synchronization problems. One
> way around this is to support full path info in each WebAppDeploy directive as
> you mentioned above. Another way is to define an app-base for that virtual
> host and then all of the Deploy directives could be relative to that. This way
> it would be more similar to the tomcat-standalone config in server.xml but
> without adding duplicate host definitions.
I completely agree with you on this topic, in fact, the very first
implementation of WARP didn't have ANY concept of Host on the Java side. If
you see it from the protocol, when a WARP request comes in, the request
already carries the ID of the application, and that is mapped to the context
instance. Look at the map() method in WarpHost (the one deciding which
context instance I need to use):
public Container map(Request request, boolean update) {
Context context=null;
this.log("Mapping request for Host");
if (request instanceof WarpRequest)
context=((WarpRequest)request).getContext();
else
context=(Context)super.map(request,update);
return(context);
}
Read it, and you'll see that the WarpRequest already KNOWS what context I
should use for my request... But there is a slight problem, the Manager
application. Without a concept of Host, the Manager application fails to
deploy applications (not that I give much crap about it, but someone might).
I would like to hear what Craig thinks about it...
The best solution would be to have something like:
server.xml
----------
<Server>
<Service name="Tomcat-Apache">
<Connector className="org.apache.catalina.connector.warp.WarpConnector"
port="8008" minProcessors="5" maxProcessors="75"
enableLookups="true"
acceptCount="10" debug="0"/>
<Engine className="org.apache.catalina.connector.warp.WarpEngine"
name="Apache" debug="0" appBase="webapps">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="apache_log." suffix=".txt"
timestamp="true"/>
<Context name="examples" path="/examples" docBase="examples"
className="org.apache.catalina.connector.warp.WarpContext">
.... All your context stuff...
</Context>
</Engine>
</Service>
</Server>
httpd.conf
----------
...
<VirtualHost a.host>
...
WebAppUse examples connection
WebAppDeploy examples connection /examples2/
</VirtualHost>
<VirtualHost b.host>
...
WebAppUse examples connection
WebAppDeploy examples connection /examples2/
</VirtualHost>
What's the difference out here? Is that basically the WarpEngine doesn't
have any concept of host (which resides at the WebServer level), but is just
a collection of Context instances...
Let's see how that configuration WOULD behave:
http://a.host:80/examples
Gets redirected to the instance of the "examples" application deployed in
server.xml, so, no fuzz, that's what I get
http://a.host:80/examples2
A new instance of the same web-application (examples) is deployed for
another context path: sessions created in a.host:80/examples are NOT VALID
in a.host:80/examples2
http://b.host:80/examples
Gets redirected to the SAME INSTANCE we're using for a.host:80/examples,
so sessions created there are valid also here (note that WebAppUse doesn't
allow you to specify a path since the servlet specification forbids you to
deploy the same context instance on two different paths)
http://b.host:80/examples2
This deploys a third instance of the same web application, but visible
only from this url...
Reversing the look:
Context #1 can be accessed from:
http://a.host:80/examples
http://b.host:80/examples
Context #2 can be accessed from:
http://a.host:80/examples2
Context #3 can be accessed from:
http://a.host:80/examples2
That was my original idea.. I would like to see what others think about it
(BTW, John, it's better to move this discussion over on tomcat-dev)...
Pier
Re: Warp and Webapp
Posted by John Carnahan <ca...@protos.lifesci.ucla.edu>.
Pier,
Thanks for the input. My responses are below.
> > I believe this is the same point I brought up last week and still have
> > not received an answer. Pier, do you have any insight here? I believe
> > that adding the WebAppAppBase directive is the most immediate and
> > parsimonious solution. Would anyone else appreciate this change?
>
> I was actually thinking about "reversing" the problem... Instead of
> configuring it from httpd.conf with "WebAppDeploy....", configuring all in
> server.xml, and then using in httpd.conf something like "WebAppDeployAll
> true", in this case, we can also solve the problem of using the Manager
> application to deploy web applications "live"...
This is a bad idea (as I describe further below). The problem with this is then
you need to synchronize the host info in both httpd.conf and server.xml since
WebAppDeployAll would have to be virtual-host-specific. It could lead to a
nightmare in the config if each virtual host had to be defined in both places.
The alternative to this synchronization is to have a more elaborate naming
scheme for referencing into server.xml. Unfortunately the spec does not give us
much latitude for this without using Host definitions.
> > First of all I would like to deploy an application using Apache/Tomcat
> > (i.e. using the warp connector specifically). The problem is that I am
> > not able to do so unless it resides in the tomcat webapps directory. The
> >
> > Tomcat standalone handles things just fine using a Host and Context.
> > But, using Apache/WARP, there is little such flexibility in how to
> > deploy apps. The WebAppDeploy directive takes only the application name
> > and a URL pattern for the defined connection. Since it is assumed that
> > the application name resides only within the CATALINA_HOME/webapps
> > directory there is no way to deploy outside of this. There are several
> > related issues and possible solutions here:
>
> Actually, the application "name" can be used as a full path... For example:
>
> WebAppDeploy /myApplications/shoppingcart.war connection /shoppingcart
Does it only recognize war files? If so I do not find that very useful. My
point for doing all of this is setting up an appropriate multi-developer
environment using Apache VirtualHosts. Using WAR files instead of simple
directories is not very appealing for development.
> > 1. The Warp connector does not acknowledge the Host configuration in
> > servers.xml. The Host configuration is the only place where it is
> > possible to specify the 'appBase' in a different location than
> > CATALINA_HOME/webapps. It makes sense that the Warp connector ignores
> > the Host configuration since the hosts should actually be defined in the
> > Apache config. But then, at least, there should be related Apache config
> > directives that roughly correspond to Tomcat specific host information
> > (e.g. WebAppAppBase). I am not sure if this is the right approach.
>
> As I said, my previous example should work, and rather than adding more
> configuration stuff in httpd.conf, I'd rather backport what is in server.xml
> and make apache "see it" right...
The problem with this, as I already mentioned, is that the virtual hosts should
be defined in the apache config. The notion of an app-base belongs in the
description of the virtual host but the tomcat-apache specfic config
(WARP connector) in server.xml does not (and should not) have any notion of a
host. The tomcat-standalone does have separate virtual hosts with their own
corresponding app-base. The better way around this problem is to give tomcat a
notion of the app-base from each separate virtual host in the apache
httpd.conf. This way virtual hosts can each have their own base. Adding
backports to server.xml would only replicate virtual hosts definitions in both
httpd.conf and server.xml which could lead to synchronization problems. One way
around this is to support full path info in each WebAppDeploy directive as you
mentioned above. Another way is to define an app-base for that virtual host and
then all of the Deploy directives could be relative to that. This way it would
be more similar to the tomcat-standalone config in server.xml but without
adding duplicate host definitions.
Let me know what you think.
John
Re: Warp and Webapp
Posted by Pier Fumagalli <pi...@betaversion.org>.
John Carnahan at carnahan@protos.lifesci.ucla.edu wrote:
> All,
>
> I believe this is the same point I brought up last week and still have
> not received an answer. Pier, do you have any insight here? I believe
> that adding the WebAppAppBase directive is the most immediate and
> parsimonious solution. Would anyone else appreciate this change?
I was actually thinking about "reversing" the problem... Instead of
configuring it from httpd.conf with "WebAppDeploy....", configuring all in
server.xml, and then using in httpd.conf something like "WebAppDeployAll
true", in this case, we can also solve the problem of using the Manager
application to deploy web applications "live"...
> Here is my question again:
>
> I am new to this list so I apologize if this has been addressed before.
> I saw several similar questions in the archives but no answers. I am
> using Tomcat 4.0 and Apache 1.3.X on RedHat Linux 7.1.
>
> First of all I would like to deploy an application using Apache/Tomcat
> (i.e. using the warp connector specifically). The problem is that I am
> not able to do so unless it resides in the tomcat webapps directory. The
>
> Tomcat standalone handles things just fine using a Host and Context.
> But, using Apache/WARP, there is little such flexibility in how to
> deploy apps. The WebAppDeploy directive takes only the application name
> and a URL pattern for the defined connection. Since it is assumed that
> the application name resides only within the CATALINA_HOME/webapps
> directory there is no way to deploy outside of this. There are several
> related issues and possible solutions here:
Actually, the application "name" can be used as a full path... For example:
WebAppDeploy /myApplications/shoppingcart.war connection /shoppingcart
> 1. The Warp connector does not acknowledge the Host configuration in
> servers.xml. The Host configuration is the only place where it is
> possible to specify the 'appBase' in a different location than
> CATALINA_HOME/webapps. It makes sense that the Warp connector ignores
> the Host configuration since the hosts should actually be defined in the
> Apache config. But then, at least, there should be related Apache config
> directives that roughly correspond to Tomcat specific host information
> (e.g. WebAppAppBase). I am not sure if this is the right approach.
As I said, my previous example should work, and rather than adding more
configuration stuff in httpd.conf, I'd rather backport what is in server.xml
and make apache "see it" right...
> 2. The WebAppDeploy directive takes an application name as a parameter.
> This does not necessarily have to be this way. It could be a path that
> is specified as an absolute path or a path relative to the
> CATALINA_HOME/webapps directory. I understand that the Servlet spec is
> somewhat limiting for the server.xml file. It would be nice if there was
> a better internal naming system such that a name described in the
> WebAppDeploy directive could map directly to a given name in the
> server.xml. An appropriate naming system would probably be the best
> solution but the spec does not really allow it.
That is exactly what the application "name" is... Did you try using a full
path in your httpd.conf.
> That said, does anyone have any advice as to how to set this up? I have
> things working with symlinks right now but that is obviously not a good
> solution. Is there something in the works right now that addresses the
> problem.
Let me know...
Pier
Re: Warp and Webapp
Posted by John Carnahan <ca...@protos.lifesci.ucla.edu>.
All,
I believe this is the same point I brought up last week and still have
not received an answer. Pier, do you have any insight here? I believe
that adding the WebAppAppBase directive is the most immediate and
parsimonious solution. Would anyone else appreciate this change? Here is
my question again:
I am new to this list so I apologize if this has been addressed before.
I saw several similar questions in the archives but no answers. I am
using Tomcat 4.0 and Apache 1.3.X on RedHat Linux 7.1.
First of all I would like to deploy an application using Apache/Tomcat
(i.e. using the warp connector specifically). The problem is that I am
not able to do so unless it resides in the tomcat webapps directory. The
Tomcat standalone handles things just fine using a Host and Context.
But, using Apache/WARP, there is little such flexibility in how to
deploy apps. The WebAppDeploy directive takes only the application name
and a URL pattern for the defined connection. Since it is assumed that
the application name resides only within the CATALINA_HOME/webapps
directory there is no way to deploy outside of this. There are several
related issues and possible solutions here:
1. The Warp connector does not acknowledge the Host configuration in
servers.xml. The Host configuration is the only place where it is
possible to specify the 'appBase' in a different location than
CATALINA_HOME/webapps. It makes sense that the Warp connector ignores
the Host configuration since the hosts should actually be defined in the
Apache config. But then, at least, there should be related Apache config
directives that roughly correspond to Tomcat specific host information
(e.g. WebAppAppBase). I am not sure if this is the right approach.
2. The WebAppDeploy directive takes an application name as a parameter.
This does not necessarily have to be this way. It could be a path that
is specified as an absolute path or a path relative to the
CATALINA_HOME/webapps directory. I understand that the Servlet spec is
somewhat limiting for the server.xml file. It would be nice if there was
a better internal naming system such that a name described in the
WebAppDeploy directive could map directly to a given name in the
server.xml. An appropriate naming system would probably be the best
solution but the spec does not really allow it.
That said, does anyone have any advice as to how to set this up? I have
things working with symlinks right now but that is obviously not a good
solution. Is there something in the works right now that addresses the
problem.
Thanks,
John Carnahan
Janek Bogucki wrote:
> There was a problem with the appBase attribute of
> <Engine> in TC 4.0, see
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4134
>
> The bug is closed but still existed when I looked in
> the source for TC via ViewCVS recently.
>
> Janek Bogucki
>
> --- Chad Johnson <ch...@netnet.net> wrote: > Hey,
> > I get these exact same problems when attempting to
> > deploy out of
> > $CATALINA_HOME/webapps . So this isn't an isolated
> > event. I can supply
> > more info if needed.
> >
> > -Chad
> >
> > ----- Original Message -----
> > From: "Pier Fumagalli" <pi...@betaversion.org>
> > To: <to...@jakarta.apache.org>
> > Sent: Wednesday, October 17, 2001 9:59 AM
> > Subject: Re: Warp and Webapp
> >
> >
> > > Radiks e-Mail at jimc@radiks.net wrote:
> > >
> > > > This may have been answered, but I haven't seen
> > it anywhere.
> > > >
> > > > Using Tomcat 4.0.1, I edited the server.xml file
> > to define a new context
> > =
> > > > using a directory outside of the normal webapps
> > directory. It works =
> > > > fine over :8080/context. I edit the http.conf
> > file to include the =
> > > > mod_webapp directives and this is a problem. I
> > get an endless loop of =
> > > > errors in the apache/logs/error_log stating the
> > webapp can't be =
> > > > deployed. When I look at the WarpConnector
> > logs, it tells me it's =
> > > > looking in webapps for my context. I think it
> > should use what's in the
> > =
> > > > server.xml file - mod_jk does.
> > > >
> > > > Am I all wet here?
> > >
> > > Can you send me a copy of your apache error log
> > and catalina log? Thanks!
> > >
> > > Pier
> > >
> >
>
> ____________________________________________________________
> Nokia Game is on again.
> Go to http://uk.yahoo.com/nokiagame/ and join the new
> all media adventure before November 3rd.
Re: Warp and Webapp
Posted by Janek Bogucki <ja...@yahoo.co.uk>.
I was mistaken when I said the bug was not fixed in
ViewCVS. I confused the 'appbase -> appBase' bug with
a different minor typo-style bug. Sorry for bandwidth
loss.
Janek Bogucki
--- Pier Fumagalli <pi...@betaversion.org> wrote: >
Janek Bogucki at janekdb@yahoo.co.uk wrote:
>
> > There was a problem with the appBase attribute of
> > <Engine> in TC 4.0, see
> >
> >
>
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4134
> >
> > The bug is closed but still existed when I looked
> in
> > the source for TC via ViewCVS recently.
>
> It seems to be fixed here:
>
http://cvs.apache.org/viewcvs.cgi/~checkout~/jakarta-tomcat-connectors/webap
>
p/java/WarpConnector.java?rev=1.22&content-type=text/plain
>
> But I'll make some tests to see if it works or
> not...
>
> Pier
>
____________________________________________________________
Nokia Game is on again.
Go to http://uk.yahoo.com/nokiagame/ and join the new
all media adventure before November 3rd.
Re: Warp and Webapp
Posted by Pier Fumagalli <pi...@betaversion.org>.
Janek Bogucki at janekdb@yahoo.co.uk wrote:
> There was a problem with the appBase attribute of
> <Engine> in TC 4.0, see
>
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4134
>
> The bug is closed but still existed when I looked in
> the source for TC via ViewCVS recently.
It seems to be fixed here:
http://cvs.apache.org/viewcvs.cgi/~checkout~/jakarta-tomcat-connectors/webap
p/java/WarpConnector.java?rev=1.22&content-type=text/plain
But I'll make some tests to see if it works or not...
Pier
Re: Warp and Webapp
Posted by Janek Bogucki <ja...@yahoo.co.uk>.
There was a problem with the appBase attribute of
<Engine> in TC 4.0, see
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4134
The bug is closed but still existed when I looked in
the source for TC via ViewCVS recently.
Janek Bogucki
--- Chad Johnson <ch...@netnet.net> wrote: > Hey,
> I get these exact same problems when attempting to
> deploy out of
> $CATALINA_HOME/webapps . So this isn't an isolated
> event. I can supply
> more info if needed.
>
> -Chad
>
> ----- Original Message -----
> From: "Pier Fumagalli" <pi...@betaversion.org>
> To: <to...@jakarta.apache.org>
> Sent: Wednesday, October 17, 2001 9:59 AM
> Subject: Re: Warp and Webapp
>
>
> > Radiks e-Mail at jimc@radiks.net wrote:
> >
> > > This may have been answered, but I haven't seen
> it anywhere.
> > >
> > > Using Tomcat 4.0.1, I edited the server.xml file
> to define a new context
> =
> > > using a directory outside of the normal webapps
> directory. It works =
> > > fine over :8080/context. I edit the http.conf
> file to include the =
> > > mod_webapp directives and this is a problem. I
> get an endless loop of =
> > > errors in the apache/logs/error_log stating the
> webapp can't be =
> > > deployed. When I look at the WarpConnector
> logs, it tells me it's =
> > > looking in webapps for my context. I think it
> should use what's in the
> =
> > > server.xml file - mod_jk does.
> > >
> > > Am I all wet here?
> >
> > Can you send me a copy of your apache error log
> and catalina log? Thanks!
> >
> > Pier
> >
>
____________________________________________________________
Nokia Game is on again.
Go to http://uk.yahoo.com/nokiagame/ and join the new
all media adventure before November 3rd.
Re: Warp and Webapp
Posted by Chad Johnson <ch...@netnet.net>.
Hey,
I get these exact same problems when attempting to deploy out of
$CATALINA_HOME/webapps . So this isn't an isolated event. I can supply
more info if needed.
-Chad
----- Original Message -----
From: "Pier Fumagalli" <pi...@betaversion.org>
To: <to...@jakarta.apache.org>
Sent: Wednesday, October 17, 2001 9:59 AM
Subject: Re: Warp and Webapp
> Radiks e-Mail at jimc@radiks.net wrote:
>
> > This may have been answered, but I haven't seen it anywhere.
> >
> > Using Tomcat 4.0.1, I edited the server.xml file to define a new context
=
> > using a directory outside of the normal webapps directory. It works =
> > fine over :8080/context. I edit the http.conf file to include the =
> > mod_webapp directives and this is a problem. I get an endless loop of =
> > errors in the apache/logs/error_log stating the webapp can't be =
> > deployed. When I look at the WarpConnector logs, it tells me it's =
> > looking in webapps for my context. I think it should use what's in the
=
> > server.xml file - mod_jk does.
> >
> > Am I all wet here?
>
> Can you send me a copy of your apache error log and catalina log? Thanks!
>
> Pier
>
Re: Warp and Webapp
Posted by Pier Fumagalli <pi...@betaversion.org>.
Radiks e-Mail at jimc@radiks.net wrote:
> This may have been answered, but I haven't seen it anywhere.
>
> Using Tomcat 4.0.1, I edited the server.xml file to define a new context =
> using a directory outside of the normal webapps directory. It works =
> fine over :8080/context. I edit the http.conf file to include the =
> mod_webapp directives and this is a problem. I get an endless loop of =
> errors in the apache/logs/error_log stating the webapp can't be =
> deployed. When I look at the WarpConnector logs, it tells me it's =
> looking in webapps for my context. I think it should use what's in the =
> server.xml file - mod_jk does.
>
> Am I all wet here?
Can you send me a copy of your apache error log and catalina log? Thanks!
Pier