944,150 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Marked Solved
  • Views: 3552
  • Java RSS
Nov 10th, 2007
0

images not displaying in JSP pages!

Expand Post »
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?!?!

Java Syntax (Toggle Plain Text)
  1. <img src"../images/situations/pic.gif" alt="pic" />
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
smacklby is offline Offline
2 posts
since Nov 2007
Nov 10th, 2007
0

Re: images not displaying in JSP pages!

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.
Team Colleague
Reputation Points: 1658
Solved Threads: 331
duckman
jwenting is offline Offline
7,719 posts
since Nov 2004
Nov 10th, 2007
0

Re: images not displaying in JSP pages!

Click to Expand / Collapse  Quote originally posted by jwenting ...
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.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
smacklby is offline Offline
2 posts
since Nov 2007
Nov 10th, 2007
0

Re: images not displaying in JSP pages!

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.
Moderator
Featured Poster
Reputation Points: 2786
Solved Threads: 874
Code tags enforcer
peter_budo is offline Offline
6,659 posts
since Dec 2004

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Resize
Next Thread in Java Forum Timeline: Random Number Java Code





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC