Forum     

Go Back   Digit Technology Discussion Forum > Software > Programming
Register FAQ Calendar Mark Forums Read

Programming The destination for developers - C, C++, Java, Python and the lot


Closed Thread
 
LinkBack Thread Tools Display Modes
Old 03-12-2008, 11:42 PM   #1 (permalink)
Right Off the Assembly Line
 
Join Date: May 2008
Posts: 13
Exclamation images not displayed when running page through local server


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.
dhiraj_ is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 03-12-2008, 11:44 PM   #2 (permalink)
Right Off the Assembly Line
 
Join Date: Dec 2008
Posts: 7
Default Re: images not displayed when running page through local server

relative URLs maybe? very probable I think.
Make them absolute.
tech_payne is offline  
Old 04-12-2008, 12:08 AM   #3 (permalink)
Broken In
 
Join Date: Aug 2008
Location: Mumbai, India
Posts: 169
Default Re: images not displayed when running page through local server

relative URLs should be fine. Post your directory structure.
Bandu is offline  
Old 04-12-2008, 12:39 AM   #4 (permalink)
Right Off the Assembly Line
 
Join Date: May 2008
Posts: 13
Default Re: images not displayed when running page through local server

Quote:
Originally Posted by Bandu View Post
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.
dhiraj_ is offline  
Old 04-12-2008, 12:46 AM   #5 (permalink)
Broken In
 
Join Date: Aug 2008
Location: Mumbai, India
Posts: 169
Default Re: images not displayed when running page through local server

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='../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.
Bandu is offline  
Closed Thread

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP setting up Local Web Server sridatta QnA (read only) 6 12-02-2007 10:52 PM
I CANT SURF THE NET ( PAGE CANNOT BE DISPLAYED)........ dinesh_mettur QnA (read only) 10 24-02-2006 12:13 AM
Images not displayed sometimes in Firefox bharat_r Internet & WWW 7 28-07-2005 05:08 PM
Page can't be displayed techpro_bunty QnA (read only) 3 14-01-2005 04:52 AM

 
Latest Threads
- by gforz
- by soumya
- by Sujeet
- by icebags
- by Charan

Advertisement




All times are GMT +5.5. The time now is 03:01 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2