Deploying multiple WAR files on Resin and Apache

From: Thu, Aye <ThuA@usa.redcross.org>
Date: Wed Apr 03 2002 - 08:56:03 PST

This is not exactly a resin question but it relates to configuration of
Resin with Apache. The scenario is:
1. I have multiple WAR files representing multiple applications. Each
application have their own images and HTML files in /images and /html
subdirectories relative to the application in the WAR file. (e.g. in JSP
files, applications refer to their image resources as <IMG height=4
src="images/blue_line.jpg" >)

2. I have resin configured with:
        <web-app id='app1' app-dir="/usr/websites/app1/app1.war"/>

3. I have Apache configured with:

    Alias /app1/ "/usr/websites/app1"
    <Directory "/usr/websites/app1">
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
    </Directory>

4. Everything works fine for JSPs and Servlets but all the relative paths
for images and javascripts are being relative from the root URL and not the
"/app1" URL.
http://myserver/app1 <http://myserver/app1>
Each app have their own images so I can't create an alias called /images/.

The question is how do I configure Resin or Apache so that any relative
paths in the WAR files are calculated for that WAR file's URL and not the
root URL?

Thanks!
Aye

Aye-Theinga K. Thu
Software Engineering
NBCS Development Center
(703) 803-4937
Received on Wed 03 Apr 2002 08:56:03 -0800

This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:17:00 PDT