images not displayed when running page through local server

Status
Not open for further replies.

dhiraj_

Broken In
Hello this is Dhiraj!!

I've been making this project in JSP+HTML and I am facing this problem...

When I try to run an HTML file from my local server the images of the page do not get displayed properly. Everytime few of the images are shown missing.

But when I try and simply run the HTML file without the server then the images are properly displaying....what could be the problem?

I am using Tomcat Apache server and have been trying to run pages in both Firefox and IE.

Can somebody help me with that.
 
OP
D

dhiraj_

Broken In
relative URLs should be fine. Post your directory structure.


..as all the images for a page are in separate images folder.
The directory structure is
jakarta-tomcat-5.5.9/webapps/ROOT/Dhiraj/images/header1_r2_c4.gif

Why there is difference...the exact problem is some of the images from that folder are displayed and some are not.
 

Bandu

Journeyman
As you said earlier that some are displayed and some are not, I guess it must be the case that the images are displayed on a certain page of your application and not displayed entirely on some other page. Might be because the later one is in a different directory structure.

To refer the image from a html / jsp, say in ROOT/Dhiraj you will have to write
Code:
<img src='images/header1_r2_c4.gif'/>

But, if the file using the image is in say, ROOT/someotherfolder, then it would be:

Code:
<img src='[B]../[/B]images/header1_r2_c4.gif'/>

Do let me know if we are on the same lines. If possible, paste some snippets of conditions where the images don't work.
 
Status
Not open for further replies.
Top Bottom