Thanks, Chris. I think that would be the long term solution and I'll be
doing that. Combing through the archives, I found a temporary solution which
is to add the following to the Apache conf file:
<Location "/app1/">
sethandler caucho-request
</Location>
I think this means that all requests for app1 goes straight to Resin and
Apache doesn't even handle images.
-----Original Message-----
From: Chris Pratt [mailto:thechrispratt@xxx.com]
Sent: Wednesday, April 03, 2002 1:08 PM
To: resin-interest@xxx.com
Subject: Re: Deploying multiple WAR files on Resin and Apache
That's because the <img and <link tags are being loaded by the browser, not
the server. One thing you could do is use request.getContextPath() +
"/images/image.gif" in the src attribute for the <img> tag.
(*Chris*)
----- Original Message -----
From: Thu, <mailto:ThuA@usa.redcross.org> Aye
To: 'resin-interest@xxx.com' <mailto:'resin-interest@xxx.com'>
Sent: Wednesday, April 03, 2002 8:56 AM
Subject: Deploying multiple WAR files on Resin and Apache
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 11:34:31 -0800
This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:17:00 PDT