tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Bachrynowski" <>
Subject RE: Serving files from the Apache docroot
Date Mon, 27 Jan 2003 15:44:10 GMT
A further thought is that this is because Tomcat4 is configured as both
stand-alone and as JK2 connected to Apache.  I only hold on Tomcat4, jsp
elements and a restricted set of xml and xslt elements.  I hold on
Apache2 everything else.  By forceing a directory change in "href" and
"src" HTML attribute references then Apache2 works correctly.

I use JSP to dynamically format (using XSLT) an XML page to HTML.
The generated HTML page contains the following.

If the generated html page contains 
<LINK REL="STYLESHEET" TYPE="text/css" HREF="../styles/mainie5.css" />
all works well and the stylesheet is served from Apache2 as required.
If the generated html page contains
<LINK REL="STYLESHEET" TYPE="text/css" HREF="mainie5.css" />
then "mainie5.css" cannot be found.  If I add this file to Tomcat all
works OK.

Likewise references to "../images/logo.gif" are directed to Apache2
whereas "logo.gif" is directed to Tomcat4.

My IT Operations colleagues who have a more detailed knowledge of
configuring Apache than I have suggest that if Tomcat is not configured
as stand-alone and MIME type support on Tomcat for all except jsp, xml
and xslt is removed then all should work OK.

Perhaps this is a "development" non issue because in production we would
only run Tomcat behind Apache2 and never as stand-alone....therefore the
problem would not occur.


-----Original Message-----
From: Henning Heil [] 
Sent: 27 January 2003 14:51
To: Tomcat Users List
Subject: Re: Serving files from the Apache docroot

Hi Peter,

I had and have the same problem - and didn't find a solution yet. A more

or less good workaround I discussed with (or better was a suggestion by)

Mike Bachrynowski (who is also member on the list) could be to 
completely mirror the apache docroot to the tomcat docroot. This in my 
eyes is 'a little' waste of disk space and an alternative I though about

is, to set the tomcat docroot to the same local dir the apache's points 
to - but I haven't tested this, maybe causes bad bad problems.

As far as I understood the mayor cause for all this is, that jk2 
developers due to performance reasons don' t want to send back requests 
(for images, .js, .css ...) to the apache and - what you and Mike and I 
want to do becomes impossible. <-- LIST: is this right (I'm not really 
sure whether I should believe it)?

What I'm asking myself: is there anybody on the list who is really 
highly experienced in jk2 coniguration?

Well, over all, hope this helps a bit,


Peter Flynn wrote:

> I just brought up Tomcat in order to serve a handful of .jsp files 
> which are in the Apache document root.
> Right now of course, when Apache hands off the request to Tomcat for 
> /foo.jsp, Tomcat comes back with a 404 because it can't find the file:
> > HTTP Status 404 - /foo.jsp
> >
> > type Status report
> >
> > message /foo.jsp
> >
> > description The requested resource (/foo.jsp) is not available. 
> > Apache Tomcat/4.1.18
> Where do I tell Tomcat to look for this file in (eg) /var/www/html? 
> Where is it currently looking?
> ///Peter
> --
> To unsubscribe, e-mail: 
> <>
> For additional commands, e-mail: 
> <>

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message