images not displaying in JSP pages!

Thread Solved

Join Date: Nov 2007
Posts: 2
Reputation: smacklby is an unknown quantity at this point 
Solved Threads: 0
smacklby smacklby is offline Offline
Newbie Poster

images not displaying in JSP pages!

 
0
  #1
Nov 10th, 2007
Help!

I am losing my mind trying to display images in my JSP pages -- something that is rather simple, otherwise complicatied in JSP!

Here is the code, what am I doing wrong?!?!

  1. <img src"../images/situations/pic.gif" alt="pic" />
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 212
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: images not displaying in JSP pages!

 
0
  #2
Nov 10th, 2007
you're doing nothing wrong per se, except that most likely the actual location of the image in your web app is different from where you tell the browser it is.

Check the real URL created for the image, and compare that with the location it exists on your application.
Most likely there's a discrepancy there.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2
Reputation: smacklby is an unknown quantity at this point 
Solved Threads: 0
smacklby smacklby is offline Offline
Newbie Poster

Re: images not displaying in JSP pages!

 
0
  #3
Nov 10th, 2007
Originally Posted by jwenting View Post
you're doing nothing wrong per se, except that most likely the actual location of the image in your web app is different from where you tell the browser it is.

Check the real URL created for the image, and compare that with the location it exists on your application.
Most likely there's a discrepancy there.

I already figured it out!

Look at my code again, and see if maybe I am missing an equals sign (=) somewhere, like after the src attribute!

I have lost hours on this (havent written in JSp in a while, and thought there was something else happening, like a problem with the servlet finding my images folder)

Thanks.... I feel stupid, but I know this (something simple causing a problem taking a while to figure out) happens -- well, at least it has happened to me before
Last edited by smacklby; Nov 10th, 2007 at 3:46 pm.
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 4,190
Reputation: peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of peter_budo has much to be proud of 
Solved Threads: 483
Moderator
Featured Poster
peter_budo's Avatar
peter_budo peter_budo is offline Offline
Code tags enforcer

Re: images not displaying in JSP pages!

 
0
  #4
Nov 10th, 2007
Everybody have to learn somewhere...
It is better to learn from other people mistakes but sometimes we can not avoid to do some stupid things by ourselfs.
Learn to see in another's calamity the ills which you should avoid.
Publilius Syrus
(~100 BC)

LJC - London Java Community, Graduate & Undergraduate Software Development Community, JAVAWUG (Java Web User Group), The London Android Group
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC