954,554 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

images not displaying in JSP pages!

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?!?!

<img src"../images/situations/pic.gif" alt="pic" />
smacklby
Newbie Poster
2 posts since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

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.

jwenting
duckman
Team Colleague
8,392 posts since Nov 2004
Reputation Points: 1,662
Solved Threads: 337
 

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 :)

smacklby
Newbie Poster
2 posts since Nov 2007
Reputation Points: 10
Solved Threads: 0
 

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.

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You