I do mostly CF but, we usually create a global 'Root' variable that contains
'http://www.xxxxx.com', and make all link and graphics paths absolute. This
keeps graphics coming from where they should be and makes global address
changes a snap. This has the added benefit of keeping links and graphics
intact even if someone copies the page and saves or sends it to someone
else. As long as the recipient is connected to the web your page displays
correctly, and redirects the user to your site if a link is clicked.


Thank You,
Jon Cole ACP
DevTech Inc.
[EMAIL PROTECTED]
206.956.0888
Learn more about DevTech @ www.Dev-Tech.com 


"I hate to advocate drugs, alcohol, violence, or insanity to anyone, but
they've always worked for me."

- Dr. Hunter S. Thompson


-----Original Message-----
From: Victor Marinelli [mailto:[EMAIL PROTECTED]]
Sent: Friday, May 18, 2001 6:34 AM
To: JRun-Talk
Subject: broken image links



Hello,

   I discovered a problem I am having with images. First, to give some
background, I am using JRun 3.0 and Apache 1.3.14 on Solaris. I have a web
app that is using form based validation as opposed to basic. The reason I
went with form validation was so I could incorporate graphics and basically
make the login screen look nice. All images are physically located in an
"images" subdirectory and the <img src> uses a relative path. The actual
login and login error forms are located in the root directory of my web-app.
I also have several other subdirectories in my web-app defined such as
"customers" and "administration". They contain various JSP files.

Here is the problem:

    1) A user logs in and brings up a page in their browser. The file is
physically located in "customers" subdirectory.
    2) The session times out.
    3) The user goes to access another file located under customers unaware
that the session timed out.
    4) Jrun redirects the user back to the login screen. (Which is what it
is supposed to do)
    5) The login screen appears, but all images are broken links.

When I viewed the HTML source in the browser, I noticed that JRun appends
all of my <img src> tags with the subdirectory "customers".
Another words, all images in the login form were originally coded as such:

<img src="images/logo.gif">

and in this scenario, JRun changes them to this:

<img src="customers/images/logo.gif">

This obviously results in a broken link.



Can someone offer any guidance with this?

Any help would be greatly appreciated.

Vic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to