You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Caroline Jen <ji...@yahoo.com> on 2006/03/23 22:59:21 UTC

[OT]Loading Image Problem

I am able to show a image in the web page; say, page
A, when the page is first loaded.  To load the image,
I specified something like:
[CODE]
<img src="../../images/arrow_collapsed.gif" border="0"
alt="expand">
[/CODE]
After drilling down the hierarchy of the web site
(i.e., navigating further) and then coming back to
page A, the same image at the same place in page A
cannot be loaded, and I got this X.

What should I do to fix the problem?  Thank you.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [OT]Loading Image Problem

Posted by Vinit Sharma <vi...@gmail.com>.
It's always better to use context root to access web site content instead of
using ../.. in the path. For eg, your application context root is MyApp and
your images folder is a part of WebContent folder in Websphere, then image
src should be:

<img src="/MyApp/images/arrow_collapsed.gif" border="0" alt="expand">

This will always access image by looking at the context root instead of
looking for a relative path.

---
Vinit

On 3/24/06, Caroline Jen <ji...@yahoo.com> wrote:
>
> I am able to show a image in the web page; say, page
> A, when the page is first loaded.  To load the image,
> I specified something like:
> [CODE]
> <img src="../../images/arrow_collapsed.gif" border="0"
> alt="expand">
> [/CODE]
> After drilling down the hierarchy of the web site
> (i.e., navigating further) and then coming back to
> page A, the same image at the same place in page A
> cannot be loaded, and I got this X.
>
> What should I do to fix the problem?  Thank you.
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


--
Vinit Sharma