Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Image Does Not Get Picked Up
Joined: Nov 19, 2000
Sep 02, 2004 09:24:00
I am using the Struts framework. I have an image and this is my image tag:
<html:img page="/HSInfo/frame/common/images/dhs-header-title.JPEG" border="0" width="800" alt="[infomation]"/>
The image does not get picked up in the browser. Therefore, only the text "information" is shown.
HSInfo is the name of my application and it is right under the $TOMCAT/webapps directory.
Because the image does not get picked up, I right click in the browser to "view source" to get a clue. The source code shows page="/HSInfo/frame/common/images/dhs-header-title.JPEG"
The image dhs-header-title.jpeg is in the folder that I specified. The spelling is correct. And the extension is .jpeg
What else could cause that the image does not get picked up?
Joined: Sep 25, 2003
Sep 02, 2004 10:00:00
Get rid of the "/HSInfo" part of your file path.
Starting a file path with a "/" means that the application will start looking for the file from your web application's root directory (which for you is HSInfo), NOT
's "webapps" folder.
I agree. Here's the link:
- it saves me about five hours per week
subject: Image Does Not Get Picked Up
CSS and image positioning
intersting discovery and a problem for images not showing up in JSPs
Image loading problem
Simple animated GIF ? - Why preloading doesn't work in IE
Problem using html frames with struts and tiles
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013