You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bob Byron <ja...@radit.com> on 2001/11/09 00:47:03 UTC

Apache, Tomcat, mod_webapp and Static files

I have Apache configured to delivier a number
of websites using the VirtualHost.  I have since
added a webapp to one site using the 
WebAppDeploy directive.  Problem is that 
all files are now delivered from Tomcat.  Is
there a gude somewhere on how to have
Apache deliver the static files and have Tomcat
deliver the jsp's?

Thanks,
Bob Byron


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Apache, Tomcat, mod_webapp and Static files

Posted by David Smith <dn...@cornell.edu>.
Mod_webapp forwards all requests for a directory to the app and as of right 
now, there is no "send jsp's to TC, but serve out the rest local".  As I 
understand it from Pier's past posts, this is in the future without a 
definite time table.  For now, best bet is to either place the static content 
in a separate dir not forwarded by mod_webapp or use mod_jk instead.  Mod_jk 
uses wild cards to selectively forward only some requests while leaving 
others.

--David Smith

On Friday 09 November 2001 02:54 pm, you wrote:
> I still would like to know how to have Apache handle the static
> files while Tomcat handles the dynamic ones.
>
> Bob
> ----- Original Message -----
> From: "Bob Byron" <ja...@radit.com>
> To: <to...@jakarta.apache.org>
> Sent: Thursday, November 08, 2001 5:47 PM
> Subject: Apache, Tomcat, mod_webapp and Static files
>
> > I have Apache configured to delivier a number
> > of websites using the VirtualHost.  I have since
> > added a webapp to one site using the
> > WebAppDeploy directive.  Problem is that
> > all files are now delivered from Tomcat.  Is
> > there a gude somewhere on how to have
> > Apache deliver the static files and have Tomcat
> > deliver the jsp's?
> >
> > Thanks,
> > Bob Byron
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Apache, Tomcat, mod_webapp and Static files

Posted by James Williamson <ja...@nameonthe.net>.
Hi Paul,

You can actually do this in Apache, webapp sets itself up as the default
handler for all files under the context you've set it to (I wrote about this
a while back). To have static files (i.e. .html) processed by Apache you can
override mod_webapp by doing something like this:

AddHandler default-handler .gif .jpeg .html

This does however depend on your Apache configuration (i.e. which order
handlers are called), but normally you should be OK.

Regards,

James

----- Original Message -----
From: Paul Devisser <pa...@stonylakesolutions.com>
To: Tomcat Users List <to...@jakarta.apache.org>
Sent: Friday, November 09, 2001 8:06 PM
Subject: Re: Apache, Tomcat, mod_webapp and Static files


> We experienced a similar problem.  Our solution was to place the static
> pages in the document root .../www/html while having the webapp utilize
> something like /webapp/
>
> Using paths such as /images to serve up graphics and such, Apache serves
the
> static, while only passing anything with a /webapp/ url to Tomcat.  Not
the
> prettiest of solutions, but it seemed the simpliest.
>
> Paul Devisser
>
> ----- Original Message -----
> From: "Bob Byron" <bb...@radit.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Friday, November 09, 2001 2:54 PM
> Subject: Re: Apache, Tomcat, mod_webapp and Static files
>
>
> > I still would like to know how to have Apache handle the static
> > files while Tomcat handles the dynamic ones.
> >
> > Bob
> > ----- Original Message -----
> > From: "Bob Byron" <ja...@radit.com>
> > To: <to...@jakarta.apache.org>
> > Sent: Thursday, November 08, 2001 5:47 PM
> > Subject: Apache, Tomcat, mod_webapp and Static files
> >
> >
> > > I have Apache configured to delivier a number
> > > of websites using the VirtualHost.  I have since
> > > added a webapp to one site using the
> > > WebAppDeploy directive.  Problem is that
> > > all files are now delivered from Tomcat.  Is
> > > there a gude somewhere on how to have
> > > Apache deliver the static files and have Tomcat
> > > deliver the jsp's?
> > >
> > > Thanks,
> > > Bob Byron
> > >
> > >
> > > --
> > > To unsubscribe:   <ma...@jakarta.apache.org>
> > > For additional commands: <ma...@jakarta.apache.org>
> > > Troubles with the list: <ma...@jakarta.apache.org>
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Apache, Tomcat, mod_webapp and Static files

Posted by Paul Devisser <pa...@stonylakesolutions.com>.
We experienced a similar problem.  Our solution was to place the static
pages in the document root .../www/html while having the webapp utilize
something like /webapp/

Using paths such as /images to serve up graphics and such, Apache serves the
static, while only passing anything with a /webapp/ url to Tomcat.  Not the
prettiest of solutions, but it seemed the simpliest.

Paul Devisser

----- Original Message -----
From: "Bob Byron" <bb...@radit.com>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Friday, November 09, 2001 2:54 PM
Subject: Re: Apache, Tomcat, mod_webapp and Static files


> I still would like to know how to have Apache handle the static
> files while Tomcat handles the dynamic ones.
>
> Bob
> ----- Original Message -----
> From: "Bob Byron" <ja...@radit.com>
> To: <to...@jakarta.apache.org>
> Sent: Thursday, November 08, 2001 5:47 PM
> Subject: Apache, Tomcat, mod_webapp and Static files
>
>
> > I have Apache configured to delivier a number
> > of websites using the VirtualHost.  I have since
> > added a webapp to one site using the
> > WebAppDeploy directive.  Problem is that
> > all files are now delivered from Tomcat.  Is
> > there a gude somewhere on how to have
> > Apache deliver the static files and have Tomcat
> > deliver the jsp's?
> >
> > Thanks,
> > Bob Byron
> >
> >
> > --
> > To unsubscribe:   <ma...@jakarta.apache.org>
> > For additional commands: <ma...@jakarta.apache.org>
> > Troubles with the list: <ma...@jakarta.apache.org>
>
>
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>
>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


Re: Apache, Tomcat, mod_webapp and Static files

Posted by Bob Byron <bb...@radit.com>.
I still would like to know how to have Apache handle the static
files while Tomcat handles the dynamic ones.

Bob
----- Original Message ----- 
From: "Bob Byron" <ja...@radit.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, November 08, 2001 5:47 PM
Subject: Apache, Tomcat, mod_webapp and Static files


> I have Apache configured to delivier a number
> of websites using the VirtualHost.  I have since
> added a webapp to one site using the 
> WebAppDeploy directive.  Problem is that 
> all files are now delivered from Tomcat.  Is
> there a gude somewhere on how to have
> Apache deliver the static files and have Tomcat
> deliver the jsp's?
> 
> Thanks,
> Bob Byron
> 
> 
> --
> To unsubscribe:   <ma...@jakarta.apache.org>
> For additional commands: <ma...@jakarta.apache.org>
> Troubles with the list: <ma...@jakarta.apache.org>


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>