tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Wareham" <>
Subject Re: mixed html and jsp site using ProxyPass
Date Wed, 03 Dec 2008 12:11:16 GMT
David Goodenough wrote:
> I have a site which is a mixture of html (and a bunch of images and 
> flash and other such stuff which came in from the web designer) and
> a couple of JSPs.  I have implemented this with Apache 2.2 and Tomcat
> 5.5, using ProxyPass statements with ajp in the Location tag.
> My location block looks like:
> <Location /> # it is the root application
>   ProxyPass ajp://
>   ProxyPassReverse http://...domain...
>   SetOutputFilter proxy-html
>   ProxyHTMLURLMap http://...domain...
>   ProxyHTMLURLMAP / http://...domain...
>   </Location>
> So the base stuff is at the root, and the jsp stuff is all under the
> jsp path element, so index.jsp is at jsp/index.jsp when referenced
> in a URL.
> There are some bits of the the Apache managed stuff (css files etc) that
> I need to reference in the JSP, so those are referenced as /style.css rather
> than style.css in the jsp pages.
> It would however be easier if I have the jsp code at the same level (from
> a URL path point of view) as the html etc files.  
> Is there a way to divert just the .jsp files? I tried <Location /*.jsp> but 
> that did not seem to work - maybe I got something else wrong.
> I have tried looking around with Google, but obviously I asked the wrong
> question as I did not find a useful answer.  Any help gratefullly received.
> David

As another poster suggested, if the static content (CSS, images, Flash,
etc) rarely changes, then make it part of your web application. You
could then dispense with Apache HTTPD and AJP entirely, and have Tomcat
handle the requests directly. On a Unix system, you can still run Tomcat
as an unprivileged user by having it listen on ports 8080 and 8443 for
example, and using firewall rules to forward incoming requests from
ports 80 and 443 respectively.

Chris Wareham
Senior Software Engineer
Visit London Ltd
6th floor,
2 More London Riverside, London SE1 2RR
Tel:  +44 (0)20 7234 5848
Fax: +44 (0)20 7234 5753

'Visit London Limited' is registered in England under No.761149;
Registered Office: Visit London, 2 More London Riverside, London SE1 2RR.

Visit London is the official visitor organisation for London. Visit London is partly funded
by Partnership, the Mayor's London Development Agency and London Councils.
The information contained in this e-mail is confidential and intended for the named recipient(s)
only.  If you have received it in error, please notify the sender immediately and then delete
the message.  If you are not the intended recipient, you must not use, disclose, copy or distribute
this email. The views expressed in this e-mail are those of the individual and not of Visit
London. We reserve the right to read and monitor any email or attachment entering or leaving
our systems without prior notice.
  Please don't print this e-mail unless you really need to.

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message