Re: Deploying multiple WAR files on Resin and Apache

From: Chris Pratt <thechrispratt@xxx.com>
Date: Wed Apr 03 2002 - 10:08:28 PST

Deploying multiple WAR files on Resin and ApacheThat'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, Aye
  To: '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
  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

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
Received on Wed 03 Apr 2002 10:08:28 -0800

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